Trying to access array offset on value of type null on Instagramshoppable/Controller/Gallery/Popuphtml.php on line 58

$a1 = file_get_contents($insta_url); $b1 = json_decode($a1, TRUE);


1 Answer 1


This may occur if $b1 have some data but doesn't have index['graphql']['shortcode_media'];

So first check if the index exist then assign it to some variable your's code should be like

if(isset($b1['graphql']['shortcode_media'])) { $instaArr=$b1['graphql']['shortcode_media']; }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.