how it possible an error in foreach with this checks -on blade page-

Posted 1 year ago by jahstation

the value $response exist before this checks, the value are correct, and yes I've an object, but laravel raise every time:

Invalid argument supplied for foreach() (View: /home/natty/workspace/vAssistant/vAss/resources/views/editStepperHtml.blade.php)


if(property_exists($response,'keywords')){
    if (is_array($response) || is_object($response)){
        foreach($response->keywords as $keyword){
             $risp.=$keyword.", ";
        }
        }
}

to me sounds so strange!

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.