PHP Warning PHP Warning
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

PHP Warning

Started by Anne, March 24, 2005, 05:17:32 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Anne

I get this message on the top of my full-size pics:

Warning: in_array(): Wrong datatype for second argument in /home/mysite/public_html/gallery/displayimage.php on line 447

Warning: array_push(): First argument should be an array in /home/mysite/public_html/gallery/displayimage.php on line 450


Here's part of the code from displayimage.php:

// Display the full size image
function display_fullsize_pic()
{
   global $CONFIG, $HTTP_GET_VARS, $THEME_DIR, $ALBUM_SET, $USER, $HTTP_COOKIE_VARS;
   global $lang_errors, $lang_fullsize_popup, $lang_charset;
   
   $pid = $HTTP_GET_VARS['pid'];
   
   // Add 1 to hit counter
   if (!in_array($pid, $USER['liv']) && isset($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_data'])) {
       add_hit($pid);
       if (count($USER['liv']) > 4) array_shift($USER['liv']);
       array_push($USER['liv'], $pid);
       user_save_profile();
   }

   if (function_exists('theme_display_fullsize_pic')) {
       theme_display_fullsize_pic();
       return;
   }

   ?>


This is on line 447:

   if (!in_array($pid, $USER['liv']) && isset($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_data'])) {

And on line 450:

       array_push($USER['liv'], $pid);

Help would be appreciated.

kegobeer

Have you modified your Coppermine files in any way?

Have you searched the forums for in_array(): Wrong datatype for second argument or array_push(): First argument should be an array and read those posts?

How about a link to your site?
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots