PHP Notice: Undefined index: parentid in /home/public_html/data/Dataset.php on line 319
PHP Notice: Undefined index: destinations in /home/public_html/data/Dataset.php on line 330
PHP Notice: Undefined index: radiogroup in /home/public_html/data/Dataset.php on line 340
PHP Notice: Undefined index: radiogroup in /home/public_html/data/Dataset.php on line 340
PHP Notice: Undefined index: radiogroup in /home/public_html/data/Dataset.php on line 340
PHP Notice: Undefined index: radiogroup in /home/public_html/data/Dataset.php on line 340
PHP Notice: Undefined index: name in /home/public_html/data/Dataset.php on line 220
PHP Notice: Undefined index: fieldhelp in /home/public_html/data/Dataset.php on line 236
從5.2升級到php 5.3後,我的腳本拒絕工作。我在日誌中看到很多PHP通知。未定義的索引:升級到php 5.3後的Dataset.php中的名稱
在行319:if($this->aFields["parentid"]) {
在行340:if($curField["radiogroup"]) {
我懷疑問題是其中包含許多這樣的行
if(isset($this->request_vars[$name]["id"])) {
我該如何解決這個問題的另一個文件?如果從上面的判斷可以輕鬆的話。
沒有足夠的信息給你一個明確的答案。 request_vars是用接收的POST/GET數據填充的,還是它是什麼以及它是如何填充的? 簡單的答案是沒有指定索引的條目,但爲什麼可能有許多原因。不同的配置設置,不同的默認行爲等 – inquam
你能否提供一個'var_dump($ this-> aField);'? –
這些只是警告,可能已經存在(雖然不可見),當你使用PHP 5.2。它們不會導致腳本「拒絕工作」,因爲未定義的變量會簡單地評估爲「false」。除了警告之外,您是否有任何錯誤? – jeroen