Im Jake Posted March 24, 2008 Share Posted March 24, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/97704-error/ Share on other sites More sharing options...
Im Jake Posted March 24, 2008 Author Share Posted March 24, 2008 bump Quote Link to comment https://forums.phpfreaks.com/topic/97704-error/#findComment-499955 Share on other sites More sharing options...
Im Jake Posted March 24, 2008 Author Share Posted March 24, 2008 bump Quote Link to comment https://forums.phpfreaks.com/topic/97704-error/#findComment-499964 Share on other sites More sharing options...
Im Jake Posted March 24, 2008 Author Share Posted March 24, 2008 PLZ HELP Quote Link to comment https://forums.phpfreaks.com/topic/97704-error/#findComment-499970 Share on other sites More sharing options...
Im Jake Posted March 25, 2008 Author Share Posted March 25, 2008 CMON!!!! :| Quote Link to comment https://forums.phpfreaks.com/topic/97704-error/#findComment-499985 Share on other sites More sharing options...
MadTechie Posted March 25, 2008 Share Posted March 25, 2008 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 () Quote Link to comment https://forums.phpfreaks.com/topic/97704-error/#findComment-499989 Share on other sites More sharing options...
Im Jake Posted March 25, 2008 Author Share Posted March 25, 2008 huh? I don't get it. will you like show me it. Quote Link to comment https://forums.phpfreaks.com/topic/97704-error/#findComment-500016 Share on other sites More sharing options...
MadTechie Posted March 25, 2008 Share Posted March 25, 2008 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))); Quote Link to comment https://forums.phpfreaks.com/topic/97704-error/#findComment-500020 Share on other sites More sharing options...
Im Jake Posted March 25, 2008 Author Share Posted March 25, 2008 none work. Quote Link to comment https://forums.phpfreaks.com/topic/97704-error/#findComment-500029 Share on other sites More sharing options...
Im Jake Posted March 25, 2008 Author Share Posted March 25, 2008 and i'd like to add the first one messes up my forums Quote Link to comment https://forums.phpfreaks.com/topic/97704-error/#findComment-500031 Share on other sites More sharing options...
MadTechie Posted March 25, 2008 Share Posted March 25, 2008 as i said it was breaking it up.. Little more detail needed, whats the error ? Quote Link to comment https://forums.phpfreaks.com/topic/97704-error/#findComment-500041 Share on other sites More sharing options...
Im Jake Posted March 25, 2008 Author Share Posted March 25, 2008 Same thing :\ Quote Link to comment https://forums.phpfreaks.com/topic/97704-error/#findComment-500058 Share on other sites More sharing options...
uniflare Posted March 25, 2008 Share Posted March 25, 2008 i do not believe you have the correct line number,undefined index is usually an array element you asking for that does not exist. Quote Link to comment https://forums.phpfreaks.com/topic/97704-error/#findComment-500071 Share on other sites More sharing options...
wildteen88 Posted March 25, 2008 Share Posted March 25, 2008 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))); } Quote Link to comment https://forums.phpfreaks.com/topic/97704-error/#findComment-500256 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.