Drupal 是一套開放源碼的內容管理平台,擁有多種實用的功能,可以用來建置從個人網誌到大型網路社群等各種類型的網站,例如華納唱片、紐約觀察報、Fast Company、Popular Science、SonyBMG、富比士、哈佛大學等網站,或是個人部落格(Tim Berners-Lee)、播客網站(TWIT.tv)、線上社群(SpreadFireFox.com)。
Drupal 是一套開放源碼的內容管理平台,擁有多種實用的功能,可以用來建置從個人網誌到大型網路社群等各種類型的網站,例如華納唱片、紐約觀察報、Fast Company、Popular Science、SonyBMG、富比士、哈佛大學等網站,或是個人部落格(Tim Berners-Lee)、播客網站(TWIT.tv)、線上社群(SpreadFireFox.com)。
Re: ...
我查看了我的c:\xampp\htdocs\drupal\sites\all\modules\views\includes\view.inc:
在1279行(如下),有array_key_exists這個function,而且整個file只有這一行有該function。
if (!array_key_exists($arg, $cache) || $reset) {
再用array_key_exists股溝搜尋至 http://php.net/manual/en/function.array-key-exists.php ,這是PHP對array_key_exists($arg, $cache)的document,往下讀到Changelog,發現,對於PHP 5.3.0,
------This function doesn't work with objects anymore, property_exists() should be used in this case.
再follow property_exists link 至 http://www.php.net/manual/en/function.property-exists.php ,其format為:
bool property_exists ( mixed $class , string $property )
和array_key_exists($arg, $cache)的format(如下行) 樣子差不多,
bool array_key_exists ( mixed $key , array $search )
注意:看array_key_exists 的第一個parameter,mixed $key 。看來在PHP 5.3.0之前,$key可以是mix type,PHP 5.3.0之後非得是string or an integer (見你文中的warning)。
因此,猜想,應是將
if (!array_key_exists($arg, $cache) || $reset) {
改為
if (!property_exists ($arg, $cache) || $reset) {
最近玩了一下幾個類似問題,心得如下:
drupal架站的warning PHP問題解法( http://drupaltaiwan.org/forum/20091128/3862 )
p.s.