Fix for PHP notice with undefined offset.