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
https://forums.phpfreaks.com/topic/97704-error/
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
https://forums.phpfreaks.com/topic/97704-error/#findComment-499989
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
https://forums.phpfreaks.com/topic/97704-error/#findComment-500020
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
https://forums.phpfreaks.com/topic/97704-error/#findComment-500256
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.