Title: Method TimberFunctionWrapper::__toString() must not throw an exception
Last modified: August 30, 2016

---

# Method TimberFunctionWrapper::__toString() must not throw an exception

 *  Resolved [gary14793](https://wordpress.org/support/users/gary14793/)
 * (@gary14793)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/method-timberfunctionwrapper_tostring-must-not-throw-an-exception/)
 * I am using gantry framework and suddenly got this error on all pages.
    Need help
   on this error, here is the website [http://dev.mywpstaff.com/](http://dev.mywpstaff.com/)
 * Thanks,
    Gary
 * [https://wordpress.org/plugins/timber-library/](https://wordpress.org/plugins/timber-library/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Gantry](https://wordpress.org/support/users/gantry/)
 * (@gantry)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/method-timberfunctionwrapper_tostring-must-not-throw-an-exception/#post-6714390)
 * Hi,
 * That code is wrong and I’m not sure why there’s extra stuff inside of it. I checked
   both Timber and our Gantry 5 framework and this is what the code looks like inside
   our stuff :
 *     ```
       function twig_join_filter($value, $glue = '')
       {
           if ($value instanceof Traversable) {
               $value = iterator_to_array($value, false);
           }
   
           return implode($glue, (array) $value);
       }
       ```
   
 * and on your site you can see wrong syntax and extra things like $env, $thing :
 * `function twig_join_filter($value, $glue = '') $env, $thing)`
 * This can be a bad data that happened during interrupted update etc. Please delete
   and re-download Gantry once again.
 * Thanks!
 * So as you can see
 *  Thread Starter [gary14793](https://wordpress.org/support/users/gary14793/)
 * (@gary14793)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/method-timberfunctionwrapper_tostring-must-not-throw-an-exception/#post-6714423)
 * If I delete and re-download Gantry plugin once again, will the theme changes 
   get affected?
 *  [Gantry](https://wordpress.org/support/users/gantry/)
 * (@gantry)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/method-timberfunctionwrapper_tostring-must-not-throw-an-exception/#post-6714447)
 * All changes and configurations are stored inside of theme. If you re-download
   plugin you should be just fine. As always we recommend to make a backup – just
   in case 😉
 *  Thread Starter [gary14793](https://wordpress.org/support/users/gary14793/)
 * (@gary14793)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/method-timberfunctionwrapper_tostring-must-not-throw-an-exception/#post-6714456)
 * Thanks!! It worked! 😀 Now back to my initial issue. Yesterday I found that layouts
   get stretched(full width), many of changes lost and If I do any changes on layouts,
   styles etc from back end it is not reflecting on front end. Any help appreciated.
 *  [Gantry](https://wordpress.org/support/users/gantry/)
 * (@gantry)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/method-timberfunctionwrapper_tostring-must-not-throw-an-exception/#post-6714457)
 * Great! Can you please post this issue in Gantry 5 plugin forum ? We don’t want
   to clutter the Timber support forums 😉
 *  Thread Starter [gary14793](https://wordpress.org/support/users/gary14793/)
 * (@gary14793)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/method-timberfunctionwrapper_tostring-must-not-throw-an-exception/#post-6714459)
 * OK sure. Thanks again!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Method TimberFunctionWrapper::__toString() must not throw an exception’
is closed to new replies.

 * ![](https://ps.w.org/timber-library/assets/icon-256x256.png?rev=1482054)
 * [Timber](https://wordpress.org/plugins/timber-library/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/timber-library/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/timber-library/)
 * [Active Topics](https://wordpress.org/support/plugin/timber-library/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/timber-library/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/timber-library/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [gary14793](https://wordpress.org/support/users/gary14793/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/method-timberfunctionwrapper_tostring-must-not-throw-an-exception/#post-6714459)
 * Status: resolved