Jump to content

error


Im Jake

Recommended Posts

i get this error

 

Notice: Undefined index: action in /home/ionicdes/public_html/vp/forums/Sources/Load.php(1751) : eval()'d code on line 580

 

and this is the code on line 580

 

$cache_hits[$cache_count] = array('k' => $key, 'd' => 'put', 's' => $value === null ? 0 : strlen(serialize($value))); <- whats wrong?

Link to comment
Share on other sites

STOP bumping every few minutes you should wait atleast an hour..

 

break the line up into multiple lines your spot the error

 

if you haven't found the problem i'll  post the solution in an hour!  >:(

 

EDIT: tip

 

the problem is here

's' => $value === null ? 0 : strlen(serialize($value))

 

break up into 2-4 lines of code

 

tip #2 ()

Link to comment
Share on other sites

break it up like this

$tValue = ($value === null)?0:strlen(serialize($value));
$cache_hits[$cache_count] = array('k' => $key, 'd' => 'put', 's' => $tValue);

 

but this would be better is_null

$tValue = (is_null($value))?0:strlen(serialize($value));
$cache_hits[$cache_count] = array('k' => $key, 'd' => 'put', 's' => $tValue);

 

finally try this

$cache_hits[$cache_count] = array('k' => $key, 'd' => 'put', 's' => (is_null($value))?0:strlen(serialize($value)));

Link to comment
Share on other sites

Problem is line 580 which is below

 

$cache_hits[$cache_count] = array('k' => $key, 'd' => 'put', 's' => $value === null ? 0 : strlen(serialize($value)));

 

is being dynamically generated from a foreach loop by loooks of it. Change it to:

if(isset($cache_hits[$cache_count]))
{
    $cache_hits[$cache_count] = array('k' => $key, 'd' => 'put', 's' => $value === null ? 0 : strlen(serialize($value)));
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.