X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ftemplate_processor.php;h=46252c355f54b5509ab34a8f2e2fec7925fbaae2;hb=111ace5abd855a0c4f248b34d468285b825abbd0;hp=4c317efe1fd466975545dd3a4ac64bfa344f23b5;hpb=8b13358ce33a1d3f88dedf2d50c650017614f418;p=friendica.git diff --git a/include/template_processor.php b/include/template_processor.php old mode 100755 new mode 100644 index 4c317efe1f..46252c355f --- a/include/template_processor.php +++ b/include/template_processor.php @@ -13,12 +13,14 @@ var $debug=false; private function _preg_error(){ + switch(preg_last_error()){ case PREG_INTERNAL_ERROR: echo('PREG_INTERNAL_ERROR'); break; case PREG_BACKTRACK_LIMIT_ERROR: echo('PREG_BACKTRACK_LIMIT_ERROR'); break; case PREG_RECURSION_LIMIT_ERROR: echo('PREG_RECURSION_LIMIT_ERROR'); break; case PREG_BAD_UTF8_ERROR: echo('PREG_BAD_UTF8_ERROR'); break; - case PREG_BAD_UTF8_OFFSET_ERROR: echo('PREG_BAD_UTF8_OFFSET_ERROR'); break; +// This is only valid for php > 5.3, not certain how to code around it for unit tests +// case PREG_BAD_UTF8_OFFSET_ERROR: echo('PREG_BAD_UTF8_OFFSET_ERROR'); break; default: //die("Unknown preg error."); return;