]> git.mxchange.org Git - friendica.git/blobdiff - include/template_processor.php
Merge pull request #317 from CatoTH/master
[friendica.git] / include / template_processor.php
old mode 100755 (executable)
new mode 100644 (file)
index 93bf391..46252c3
                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;
                                $os=$s; $count++;
                                $s = $this->var_replace($s);
                        }
-                       return template_unescape($s);
+                       return $s;
                }
        }