aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-07 02:31:41 -0700
committerfriendica <info@friendica.com>2012-04-07 02:31:41 -0700
commit1440786c319b25f870ef1f85dba7aaf50e49f842 (patch)
tree8bb0f56481fe500c1aed99d3e408a4cddfcaa5a0
parente575d679695fb2c4b54382440b49cc858d1c079f (diff)
downloadvolse-hubzilla-1440786c319b25f870ef1f85dba7aaf50e49f842.tar.gz
volse-hubzilla-1440786c319b25f870ef1f85dba7aaf50e49f842.tar.bz2
volse-hubzilla-1440786c319b25f870ef1f85dba7aaf50e49f842.zip
ignore utf8 offset error for unit tests
-rw-r--r--include/template_processor.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/template_processor.php b/include/template_processor.php
index 4c317efe1..46252c355 100644
--- 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;