Das Capitolin Posted October 19, 2009 Share Posted October 19, 2009 JoomSEO is a long-defunct tool to insert SEO terms into articles written on the Joomla CMS. Coinsidently, the JoomSEO.php file is the only code that reports errors for my entire website. Needless to say, I want it fixed so that I can consider my site to be free of obvious code errors. I don't expect this to be a free ride, and I sincerely thank Mchl for previous help, but any and all guidance would be appreciated. There specific errors are: Undefined variable: _SESSION in /.../JoomSEO.php on line 7 Undefined index: count in /.../JoomSEO.php on line 20 Undefined index: meta.description.text in /.../JoomSEO.php on line 147 Undefined index: text in /.../JoomSEO.php on line 150 The code is attached, but can be pasted if someone confirms that 600 lines of code is okay here. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/178268-undefined-variable-index-errors-in-joomseophp/ Share on other sites More sharing options...
cags Posted October 19, 2009 Share Posted October 19, 2009 Undefined index applies so an array. Basically if you had this.. $arr = array("forename"=>"John", "surname"=>"Smith"); echo $arr['age']; ... you are trying to access an item in an array using a key that doesn't currently exist. A solution is to check isset($arr['age']) before doing anything with it. Same applied to undefined variable, only it's a variable name not an item key. Link to comment https://forums.phpfreaks.com/topic/178268-undefined-variable-index-errors-in-joomseophp/#findComment-939960 Share on other sites More sharing options...
Das Capitolin Posted October 19, 2009 Author Share Posted October 19, 2009 Thank you for the advice, cags. I should have added that I'm a very green novice to coding. Any specific suggestions or advice would be very helpful to me. Link to comment https://forums.phpfreaks.com/topic/178268-undefined-variable-index-errors-in-joomseophp/#findComment-940025 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.