Page 1 of 1

Error Logs show Undefined offset with Google Feed

Posted: Thu Oct 11, 2018 8:50 am
by RonaldJoeScott
I'm trying to take care of this error but can't wrap my head around why this line is giving an error.

In my Error Log, this is what it shows.

Code: Select all

2018-10-09 4:00:18 - PHP Notice:  Undefined offset: 1 in /home1/aotactic/public_html/vqmod/vqcache/vq2-catalog_controller_extension_feed_google_base.php on line 1062
2018-10-09 4:00:18 - PHP Notice:  Undefined offset: 1 in /home1/aotactic/public_html/vqmod/vqcache/vq2-catalog_controller_extension_feed_google_base.php on line 1062
2018-10-09 4:00:18 - PHP Notice:  Undefined offset: 1 in /home1/aotactic/public_html/vqmod/vqcache/vq2-catalog_controller_extension_feed_google_base.php on line 1062
2018-10-09 4:00:18 - PHP Notice:  Undefined offset: 1 in /home1/aotactic/public_html/vqmod/vqcache/vq2-catalog_controller_extension_feed_google_base.php on line 1062
2018-10-09 4:00:18 - PHP Notice:  Undefined offset: 1 in /home1/aotactic/public_html/vqmod/vqcache/vq2-catalog_controller_extension_feed_google_base.php on line 1062
2018-10-09 14:58:15 - PHP Notice:  Undefined offset: 1 in /home1/aotactic/public_html/vqmod/vqcache/vq2-catalog_controller_extension_feed_google_base.php on line 1062
2018-10-09 14:58:15 - PHP Notice:  Undefined offset: 1 in /home1/aotactic/public_html/vqmod/vqcache/vq2-catalog_controller_extension_feed_google_base.php on line 1062
2018-10-09 14:58:15 - PHP Notice:  Undefined offset: 1 in /home1/aotactic/public_html/vqmod/vqcache/vq2-catalog_controller_extension_feed_google_base.php on line 1062
2018-10-09 14:58:15 - PHP Notice:  Undefined offset: 1 in /home1/aotactic/public_html/vqmod/vqcache/vq2-catalog_controller_extension_feed_google_base.php on line 1062
2018-10-09 14:58:15 - PHP Notice:  Undefined offset: 1 in /home1/aotactic/public_html/vqmod/vqcache/vq2-catalog_controller_extension_feed_google_base.php on line 1062
2018-10-10 4:00:05 - PHP Notice:  Undefined offset: 1 in /home1/aotactic/public_html/vqmod/vqcache/vq2-catalog_controller_extension_feed_google_base.php on line 1062
2018-10-10 4:00:05 - PHP Notice:  Undefined offset: 1 in /home1/aotactic/public_html/vqmod/vqcache/vq2-catalog_controller_extension_feed_google_base.php on line 1062
2018-10-10 4:00:05 - PHP Notice:  Undefined offset: 1 in /home1/aotactic/public_html/vqmod/vqcache/vq2-catalog_controller_extension_feed_google_base.php on line 1062
2018-10-10 4:00:05 - PHP Notice:  Undefined offset: 1 in /home1/aotactic/public_html/vqmod/vqcache/vq2-catalog_controller_extension_feed_google_base.php on line 1062
2018-10-10 4:00:05 - PHP Notice:  Undefined offset: 1 in /home1/aotactic/public_html/vqmod/vqcache/vq2-catalog_controller_extension_feed_google_base.php on line 1062
I went into that file and paste it into Notepad++, and this is what line 1062 looks like.
https://gyazo.com/296073bb1c58013e9c807079aef2c311

Can anybody point out what could be wrong with the code? If more info needed, let me know.

Re: Error Logs show Undefined offset with Google Feed

Posted: Thu Oct 11, 2018 5:25 pm
by uksitebuilder
Undefined offset generally means that the array key does not exist that you are trying to use. e.g. in this case [1]

Should probably check with isset() before attempting to do something with that key