corcel / acf

Advanced Custom Fields (ACF) plugin for Corcel
128 stars 100 forks source link

How to use the image #60

Closed iteearmah closed 6 years ago

iteearmah commented 6 years ago

Method Corcel\Acf\Field\Image::__toString() must return a string value (View:

jgrossi commented 6 years ago

@iteearmah Hi, first sorry about the late answer. These last weeks were busy.

Can you provide more information about this error? When does it happen?

maxkopych commented 5 years ago

I had the same problem. To fix it you need to check if field exist

if($tool->acf->tool_icon){
    echo $tool->acf->tool_icon->url;
}