0
我有一個用PHP 5.2編寫的舊網站,但在升級PHP版本後,現在已停止工作。PHP代碼從5.2升級到5.4
這是錯誤我得到:
PHP Fatal error: Call-time pass-by-reference has been removed in /var/www/vhosts/crm/httpdocs/libs/formval.class.php on line 212, referer: http://crm/admin/index.php
代碼從formval.class.php
// Are there any functions to run?
if ($functions != '') {
// Put the functions into an array.
$functionArray = explode(',', $functions);
// Loop through and run the functions.
for ($i = 0; $i < sizeof($functionArray); $i++) {
$functionName = $functionArray[$i];
switch ($functionName) {
case 'isNumber':
$callFunction = $this->isNumber($data, &$errorMsg);
break;
case 'isNumberND':
$callFunction = $this->isNumberND($data, &$errorMsg);
break;
case 'isNotZero':
$callFunction = $this->isNotZero($data, &$errorMsg);
break;
case 'isValidEmail':
$callFunction = $this->isValidEmail($data, &$errorMsg);
break;
case 'isValidDate':
$callFunction = $this->isValidDate($data, &$errorMsg);
break;
case 'isValidPassword':
$callFunction = $this->isValidPassword($data, &$errorMsg);
break;
default:
$callFunction = TRUE;
}
這是行212:
$callFunction = $this->isNumber($data, &$errorMsg);
由於這種運行在的Plesk 11.5 ,它不允許我使用apache模塊安裝5.2,只能使用CGI或FastCGI,但不能讓該站點運行。 任何想法?
謝謝,但看起來我越來越多的錯誤!現在在202行的hlpAdmin.class.php中!哈哈 – JustDima
@JustDima你需要用'$ errorMsg'替換所有'&$ errorMsg' – jeroen
是的,很好,謝謝,但它告訴我這也是錯誤的:foreach($ this-> clause作爲$ key => $ value) – JustDima