Title: Error when activate plugin | class stdClass could not be converted to string
Last modified: August 31, 2016

---

# Error when activate plugin | class stdClass could not be converted to string

 *  Resolved [w0uta](https://wordpress.org/support/users/w0uta/)
 * (@w0uta)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-when-activate-plugin-class-stdclass-could-not-be-converted-to-string/)
 * Hi,
 * When i activate the plugin i get the follow error.
 * > [29-Mar-2016 22:46:14 UTC] PHP Catchable fatal error: Object of class stdClass
   > could not be converted to string in /location/subdomain/test/wp-content/plugins/
   > autodescription/inc/classes/init.class.php on line 227
 * This error i get only on the home page other pages like to work normaly.
 * Is the plugin comptible with PHP 7 ?
 * [https://wordpress.org/plugins/autodescription/](https://wordpress.org/plugins/autodescription/)

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

 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-when-activate-plugin-class-stdclass-could-not-be-converted-to-string/#post-7220659)
 * Hi w0uta,
 * This plugin is written and tested on PHP7, PHP 5.6, PHP 5.2 and WordPress MultiSite.
 * The global WordPress core variable `$page` has been overwritten by the theme 
   and/or another plugin to become an Object instead of an Integer.
    Which is plainly
   wrong and should be resolved within the theme or plugin as WordPress core uses
   it to find the current page within in the loop. More info is found [here](https://codex.wordpress.org/Global_Variables#Inside_the_Loop_variables).
 * I’m wondering if switching themes would resolve this, if only temporarily to 
   see if that’s where the problem lies.
    If the theme is open source, I’d be happy
   to work with the theme author to resolve this issue. If it’s an external plugin
   causing the issue, the same goes for that :).
 * I hope this clears things up!
 *  Thread Starter [w0uta](https://wordpress.org/support/users/w0uta/)
 * (@w0uta)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-when-activate-plugin-class-stdclass-could-not-be-converted-to-string/#post-7220707)
 * Hi Sybre,
 * The problem is in my theme. Its a costumized theme.
    On the moment i dont understand
   whats going wrong but maybe i can find out whats going wrong on the index page.
   The theme is build on the Runway framework so i geuss there is the problem.
 * If you have any suggestion how to find the issue please let me know.
    Is there
   a debug option to find where the problem come from ?
 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-when-activate-plugin-class-stdclass-could-not-be-converted-to-string/#post-7220720)
 * Hi w0uta,
 * This is out of my hands, as it’s embedded within the Runaway Framework.
    I’ve
   opened an issue [on the theme’s GitHub](https://github.com/parallelus/Runway-Framework/issues/165).
 * I’ll add a scalar check in the next version, so if something like this happens
   in the future, it will fall back on page 0 (which is OK in almost all cases).
 * If you wish to temporarily edit The SEO Framework plugin, you are free to change
   line 227 and 228 right at where the error notification leads you to in `init.
   class.php` from the following:
 *     ```
       $page = isset( $page ) ? (string) $page : '0';
       $paged = isset( $paged ) ? (string) $paged : '0';
       ```
   
 * Into the following:
 *     ```
       $page = isset( $page ) && is_scalar( $page ) ? (string) $page : '0';
       $paged = isset( $paged ) && is_scalar( $paged ) ? (string) $paged : '0';
       ```
   
 * I hope this helps and I hope you have a wonderful day! 🙂
 *  Thread Starter [w0uta](https://wordpress.org/support/users/w0uta/)
 * (@w0uta)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-when-activate-plugin-class-stdclass-could-not-be-converted-to-string/#post-7220749)
 * Hi Sybre,
 * You are right when i add is_scalar function the error like to be gone. The plugin
   will bework the same as before the code change ?
 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-when-activate-plugin-class-stdclass-could-not-be-converted-to-string/#post-7220753)
 * Hi w0uta,
 * The results will only differ when you use Object Caching and have a paginated
   blog as front page.
    Which will only affect sharing the 2nd or later page on 
   Facebook or Twitter.
 * So it has a quite minimal impact :).
 * The next version (2.6.0) features a workaround for this issue – which is much
   more efficient as well; and it’s already in the Alpha version.
 * I hope this helps!
 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-when-activate-plugin-class-stdclass-could-not-be-converted-to-string/#post-7220803)
 * Hi w0uta,
 * The very next update (2.5.2.4) will have this issue fixed as proposed, released
   momentarily :).
 * Thank you for the bug report and have a great day!

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

The topic ‘Error when activate plugin | class stdClass could not be converted to
string’ is closed to new replies.

 * ![](https://ps.w.org/autodescription/assets/icon.svg?rev=3000376)
 * [The SEO Framework – Fast, Automated, Effortless.](https://wordpress.org/plugins/autodescription/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autodescription/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autodescription/)
 * [Active Topics](https://wordpress.org/support/plugin/autodescription/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autodescription/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autodescription/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/error-when-activate-plugin-class-stdclass-could-not-be-converted-to-string/#post-7220803)
 * Status: resolved