2

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);

            $instaArr=$b1['graphql']['shortcode_media'];

1 Answer 1

0

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.