E_WARNING(2) - array_keys() on Upgrade from 1.5.24 to 1.5.34 E_WARNING(2) - array_keys() on Upgrade from 1.5.24 to 1.5.34
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

E_WARNING(2) - array_keys() on Upgrade from 1.5.24 to 1.5.34

Started by gtgillis, January 19, 2015, 08:26:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gtgillis

I just upgraded from version 1.5.24 to 1.5.34 and I noticed the message below at the bottom of all CPG pages when logged in as admin. I did a versioncheck on the files and they are all checked green. I did the database update. The users don't see this but it has me concerned. Any ideas?


An error has occurred:
(This text is only displayed to users in the group 'Root')
E_WARNING(2) - array_keys() expects parameter 1 to be array, null given @ /home/mysite/public_html/coppermine/include/functions.inc.php line 840
Call Stack
# Function File Line
1 array_keys /home/mysite/public_html/coppermine/include/functions.inc.php 840
2 template_eval /home/mysite/public_html/coppermine/include/themes.inc.php 4206
3 theme_vanity /home/mysite/public_html/coppermine/include/themes.inc.php 1636
4 pagefooter /home/mysite/public_html/coppermine/index.php 1201
array(2) {
  ["template"]=>
  string(345) "<div id="vanity">
      <a id="v_php" href="http://www.php.net/" rel="external"></a>
      <a id="v_mysql" href="http://www.mysql.com/" rel="external"></a>
      <a id="v_xhtml" href="http://validator.w3.org/check/referer" rel="external"></a>
      <a id="v_css" href="http://jigsaw.w3.org/css-validator/check/referer" rel="external"></a>
</div>"
  ["vars"]=>
  NULL
}

gtgillis

The error turned out to be caused by changes to the theme_vanity() function in /include/themes.inc.php from versions 1.5.24 to 1.5.34.

I use a custom Geeklog bridge and the combination of the new changes and the bridge was causing the error. I don't need or want the vanity links so I commented out the call to the function and the return in the function in themes.inc.php and everything is functioning normally again.

phill104

Thanks for coming back and detailing your results, much appreciated.

Would be wonderful if you could share your geeklog bridge too.
It is a mistake to think you can solve any major problems just with potatoes.