Support » Plugin: Simple Feature Requests Free » Plugin cannot be activated due to Fatal error

  • Resolved Benny


    I wanted to give your plugin a try but I am unable to activate it because it generates a fatal error (PHP 5.3.29)

    ( ! ) Fatal error: Can't use method return value in write context in /app/public/wp-content/plugins/simple-feature-requests/inc/class-query.php on line 30
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0020	985272	{main}( )	../plugins.php:0
    2	1.9849	20000208	plugin_sandbox_scrape( )	../plugins.php:164
    3	1.9864	20039784	include( '/app/public/wp-content/plugins/simple-feature-requests/simple-feature-requests.php' )	../plugin.php:1882
    4	1.9864	20040456	JCK_Simple_Feature_Requests->__construct( )	../simple-feature-requests.php:129
    5	1.9865	20040984	JCK_Simple_Feature_Requests->load_classes( )	../simple-feature-requests.php:53
    6	2.0678	20722688	JCK_Simple_Feature_Requests->autoload( )	../simple-feature-requests.php:93
Viewing 4 replies - 1 through 4 (of 4 total)
  • BTW: I quick-fixed this for the moment by removing the empty() check. After this the plugin activated but the same error popped up on another location:

    Likewise in your class-notice.php, method has_notices() also produces that fatal error on:
    return ! empty( $this->get_notices() )
    I fixed this by replacing that line with:
    return sizeof( $this->get_notices() ) > 0;

    • This reply was modified 2 years, 6 months ago by Benny.
    Plugin Author James Kemp


    Hey Benny,

    Thanks for the info – I know what the issue is and will patch it ASAP!

    Plugin Author James Kemp


    If you know a bit of PHP and want to patch it temporarily, you just need to assign $this->notices() to a variable, then use that in the conditional.

    $notices = $this->get_notices();
    return ! empty( notices );

    The issue occurs because that version of PHP doesn’t like functions as parameters of other functions.

    Plugin Author James Kemp


    Hey, this should be resolved in 1.0.2.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Plugin cannot be activated due to Fatal error’ is closed to new replies.