aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSimon L'nu <simon.lnu@gmail.com>2012-04-07 14:47:02 -0400
committerSimon L'nu <simon.lnu@gmail.com>2012-04-07 14:47:02 -0400
commitcee36087470acbc4aeff121ab91cd337737dcc67 (patch)
treea093294b2b3ee2f99c0dc5b95d5844bf9817eafa /include
parentbc69a957dc875b699240827cb4af2691f8a8fcd6 (diff)
parentf931d5c918fa3146afa851a4f32c90a35ee1c85b (diff)
downloadvolse-hubzilla-cee36087470acbc4aeff121ab91cd337737dcc67.tar.gz
volse-hubzilla-cee36087470acbc4aeff121ab91cd337737dcc67.tar.bz2
volse-hubzilla-cee36087470acbc4aeff121ab91cd337737dcc67.zip
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: diabook-themes: small fix changelog 1.014 : image-rezise via jquery-plugin in stream comments under uploaded pictues add Diabook's version-number in head-section ignore utf8 offset error for unit tests had arg order backwards try assertContains tag tests cont. fix autonamenegativelength test some work on tests * master:
Diffstat (limited to 'include')
-rw-r--r--include/template_processor.php4
-rw-r--r--include/text.php2
2 files changed, 4 insertions, 2 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;
diff --git a/include/text.php b/include/text.php
index 29c781030..aced9e0a8 100644
--- a/include/text.php
+++ b/include/text.php
@@ -80,7 +80,7 @@ function escape_tags($string) {
if(! function_exists('autoname')) {
function autoname($len) {
- if(! $len)
+ if($len <= 0)
return '';
$vowels = array('a','a','ai','au','e','e','e','ee','ea','i','ie','o','ou','u');