a1amattyj Posted May 30, 2008 Share Posted May 30, 2008 Hello, In my error log, its just plastered with: [30-May-2008 06:14:25] PHP Notice: Undefined offset: 2 in /home/smfnew/public_html/multi_operations/forum_functions.php on line 31 [30-May-2008 06:14:25] PHP Notice: Undefined offset: 2 in /home/smfnew/public_html/multi_operations/forum_functions.php on line 31 [30-May-2008 06:14:25] PHP Notice: Undefined offset: 2 in /home/smfnew/public_html/multi_operations/forum_functions.php on line 37 [30-May-2008 06:14:25] PHP Notice: Undefined offset: 2 in /home/smfnew/public_html/multi_operations/forum_functions.php on line 37 Line 31: if($serverhost[2] == 'smfnew' || $serverhost[2] == 'com'){ $forum_name = $forum_name1; }else{ $forum_name = ''.$forum_name1.'_2'; } Line 37: if($serverhost[2] == 'smfnew' || $serverhost[2] == 'com'){ $domain1 = 'smfnew.com'; }else{ $domain1 = 'smffree.net'; } Thanks! Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted May 30, 2008 Share Posted May 30, 2008 well it just means that the offset is not set try using isset to avoid the error if(isset($serverhost[2]) && ($serverhost[2] == 'smfnew' || $serverhost[2] == 'com')){ $domain1 = 'smfnew.com'; }else{ $domain1 = 'smffree.net'; } Quote Link to comment Share on other sites More sharing options...
Sulman Posted May 30, 2008 Share Posted May 30, 2008 Ok...well the offset is in reference to the "2" that you are using in your array ($serverhost[2]). So this error is telling you that there is no element 2 in the serverhost array. Try printing the array using print_r() to see what is in it. Quote Link to comment 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.