Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Messages reset error using Smarty template in depot project
  • The part of my header.tpl code which is causing the issue looks like:

    {Messages::reset()}

    The output is resulting in the error below(Not sure how to fix this):

    ErrorException [ 4096 ]: Object of class Messages_Instance could not be converted to string



    APPPATH/tmp/Smarty/templates_c/eaad9053503c6f244e221834e6a19aced1ef3434.file.header.tpl.php @ line 81



    76</br>
    77    <?php ?>
    78<?php ?>    
    79    
    80    
    81<?php echo Messages::reset();?>
    82
    83
    84<!-- End of messages -->
    85<?php }} ?>


  • HarroHarro
    Accepted Answer
    I don't know what Messages::reset() does, but from the looks of it, it returns a Messages_Instance object, presumably so you can chain further method calls. You can't echo out an object.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion