You will get this error when you are trying to access the array index in PHP, as showing below:
echo $your_array['key'];
And most likely the array is not null and but the index you are trying to access does not exists.
So, in this situation make sure to check whether your array is really having the given index which are you are trying to access.
You can do that by using following statement:
echo isset($your_array['key']) && $your_array['key'];
Or
echo isset($your_array['key']) ? $your_array['key'] : 0;