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
This commit is contained in:
phpnut 2007-09-26 15:10:21 +00:00
parent ad6a0c12c5
commit 0c6cdfb5c9

View file

@ -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();
}
}