call to undefined function which is defined

From: Date: Mon, 11 Jun 2007 19:43:06 +0000
Subject: call to undefined function which is defined
Groups: php.general 
Request: Send a blank email to php-general+get-256650@lists.php.net to get a copy of this message
Hi, RHEL 4 PHP 4.3.9 Apache 2.0.52 Without knowing much about the web application we use, can anybody tell me what kind of situation could trigger the following 'call to undefined function' error? PHP Fatal error: Call to undefined function: encryptchar code() in /data/www/html/typo3_src/typo3/sysext/cms/tslib/class.tslib_fe.p hp on line 3439 Line 3439 is: $out .= $this->encryptCharcode($charValue,0x61,0x7A,$offset); Here is the function block that has line 3439. function encryptEmail($string,$back=0) { $out = ''; if ($this->spamProtectEmailAddresses === 'ascii') { for ($a=0; $a<strlen($string); $a++) { $out .= '&#'.ord(substr($string, $a, 1)).';'; } } else { // like str_rot13() but with a variable offset and a wider character range $len = strlen($string); $offset = intval($this->spamProtectEmailAddresses)*($back?-1:1); for ($i=0; $i<$len; $i++) { $charValue = ord($string{$i}); if ($charValue >= 0x2B && $charValue <= 0x3A) { // 0-9 . , - + / : $out .= $this->encryptCharcode($charValue,0x2B,0x3A,$offset); } elseif ($charValue >= 0x40 && $charValue <= 0x5A) { // A-Z @ $out .= $this->encryptCharcode($charValue,0x40,0x5A,$offset); } else if ($charValue >= 0x61 && $charValue <= 0x7A) { // a-z $out .= $this->encryptCharcode($charValue,0x61,0x7A,$offset); } else { $out .= $string{$i}; } } } return $out; } And the encryptCharcode() function the fatal error complained about is defined right before encrytEmail(). == function encryptCharcode($n,$start,$end,$offset) { $n = $n + $offset; if ($offset > 0 && $n > $end) { $n = $start + ($n - $end - 1); } else if ($offset < 0 && $n < $start) { $n = $end - ($start - $n - 1); } return chr($n); } == I don't understand why the error is about a function that's defined fine?? Thanks in advance for any help, Bing

« previous php.general (#256650) next »