Jump to content

Invalid argument supplied for foreach() to 'No routes found'


Recommended Posts

  • Administrators
Posted

I would use:

if(!is_array($variable))
{  
    echo 'No routes found';
    return;
}

Though you can also use

!$variable

I'm updating my code to use !is_array() though

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...