forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 upgrading => Topic started by: gtgillis on January 19, 2015, 08:26:58 pm

Title: E_WARNING(2) - array_keys() on Upgrade from 1.5.24 to 1.5.34
Post by: gtgillis on January 19, 2015, 08:26:58 pm
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?

Code: [Select]
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
}
Title: Re: E_WARNING(2) - array_keys() on Upgrade from 1.5.24 to 1.5.34
Post by: gtgillis on January 21, 2015, 03:01:07 pm
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.
Title: Re: E_WARNING(2) - array_keys() on Upgrade from 1.5.24 to 1.5.34
Post by: phill104 on January 21, 2015, 03:58:06 pm
Thanks for coming back and detailing your results, much appreciated.

Would be wonderful if you could share your geeklog bridge too.