Error when outputting a file type custom attribute
Permalink Browser Info Environment
When I select a custom attribute that's a file type (image), I get this error:
Catchable fatal error: Object of class File could not be converted to string in packages/ryan_page_value/blocks/ryan_page_value/controller.php on line 62
Catchable fatal error: Object of class File could not be converted to string in packages/ryan_page_value/blocks/ryan_page_value/controller.php on line 62
Type: | Discussion |
---|---|
Status: | In Progress |
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.
To re-open this issue, reply to this message.
To re-open this issue, reply to this message.
Hi, I'm getting a similar error message, even after adding the image_file.php as instructed above.
Error:
Warning: strlen() expects parameter 1 to be string, object given in /public_html/packages/ryan_page_value/blocks/ryan_page_value/controller.php on line 62
I'm trying to output contents of an attached HTML file. Also, my C5 version is 5.6.3.3 -- does that matter at all?
Error:
Warning: strlen() expects parameter 1 to be string, object given in /public_html/packages/ryan_page_value/blocks/ryan_page_value/controller.php on line 62
I'm trying to output contents of an attached HTML file. Also, my C5 version is 5.6.3.3 -- does that matter at all?
I'd open a new support ticket.
This code below should do what you're looking for.
Add a file to your site at:
[site root]/blocks/ryan_page_value/templates/image_file.php
with this code.
That should do it, and I'll test this and add it to the package next time I get a few minutes.