From 0c6cdfb5c971045f724239f318db189376a5edca Mon Sep 17 00:00:00 2001 From: phpnut Date: Wed, 26 Sep 2007 15:10:21 +0000 Subject: [PATCH] Fixing issue with PHP 4 referencing instance of the String object git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5695 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/string.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cake/libs/string.php b/cake/libs/string.php index 09522665b..593e84670 100644 --- a/cake/libs/string.php +++ b/cake/libs/string.php @@ -128,7 +128,7 @@ class String extends Object { * @static */ function utf8($string) { - $_this = String::getInstance(); + $_this =& String::getInstance(); $_this->__reset(); $values = array(); @@ -202,7 +202,7 @@ class String extends Object { * @static */ function strpos($haystack, $needle, $offset = 0) { - $_this = String::getInstance(); + $_this =& String::getInstance(); $haystack = $_this->utf8($haystack); $needle = $_this->utf8($needle); @@ -241,7 +241,7 @@ class String extends Object { * @static */ function stripos($haystack, $needle, $offset = 0) { - $_this = String::getInstance(); + $_this =& String::getInstance(); $haystack = $_this->strtoupper($haystack); $needle = $_this->strtoupper($needle); @@ -258,7 +258,7 @@ class String extends Object { * @static */ function strtoupper($string) { - $_this = String::getInstance(); + $_this =& String::getInstance(); $_this->utf8($string); $length = count($_this->__utf8Map); $upperCase = array(); @@ -350,7 +350,7 @@ class String extends Object { * @access private */ function __codepoint ($decimal) { - $_this = String::getInstance(); + $_this =& String::getInstance(); if ($decimal < 128) { $return = '0000_007f'; // Basic Latin @@ -675,7 +675,7 @@ class String extends Object { * @access private */ function __find($char, $type = 'lower'){ - $_this = String::getInstance(); + $_this =& String::getInstance(); $value = false; $found = array(); if(!isset($_this->__codeRange[$char])) { @@ -702,7 +702,7 @@ class String extends Object { * @access private */ function __reset() { - $_this = String::getInstance(); + $_this =& String::getInstance(); $_this->__utf8Map = array(); } }