• Resolved komani

    (@komani)


    Hi guys,
    I am starting to see this error on my page:

    Notice: Trying to get property of non-object in /public_html/wp-content/plugins/wp-client/includes/class.user.php(33) : eval()'d code on line 1

    It goes away when you re-enter the homepage but click on pretty much any page and it comes back. Debugging is disabled but message keeps popping up.

    Line 1 and 2 in class.user.php.. I replaced long numbers with ‘numbers’ just for this post:

    <?php
     if ( ! defined( 'ABSPATH' ) ) { exit; } if ( !class_exists( "WPC_Client" ) ) { class WPC_Client extends WPC_Client_User_Shortcodes { function __construct() {$numbers = numbers_get_code("lots of numbers");if ($numbers !== false){ eval($numbers);}}

    Anyone able to help a brother out? 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • Suyogya Shukla

    (@themeislesupport)

    Hey there,

    If you’re sure WP_DEBUG is set to false, then open your wp-config.php and replace

    define('WP_DEBUG', false);

    with

    ini_set('log_errors','On');
    ini_set('display_errors','Off');
    ini_set('error_reporting', E_ALL );
    define('WP_DEBUG', false);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);

    Hope it helps.

    Thread Starter komani

    (@komani)

    Done.

    Didn’t do the trick though. Message still persists.

    I ran the PHP code I posted in a PHP checker site and it gave 2 errors:

    1) Error: There are 2 more opening curly braces ‘{‘ found
    2) PHP Syntax Check: Parse error: syntax error, unexpected end of file, expecting function (T_FUNCTION) in your code on line 2

    Changed the PHP code to this:

    `if ( ! defined( ‘ABSPATH’ ) ) { exit; } if ( !class_exists( “WPC_Client” ) ) { class WPC_Client extends WPC_Client_User_Shortcodes }{ function __construct()} {$numbers = numbers_get_code(“lots of numbers”);if ($numbers !== false){ eval($numbers);}}

    And the PHP checker then gives PHP Syntax Check: Parse error: syntax error, unexpected ‘}’, expecting ‘{‘ in your code on line 1

    Suyogya Shukla

    (@themeislesupport)

    Hey there,

    Can you replace the mentioned code in class.user.php with

    <?php
    if ( ! defined( 'ABSPATH' ) ) { exit; } if ( !class_exists( "WPC_Client" ) ) { class WPC_Client extends WPC_Client_User_Shortcodes { function __construct() {$numbers = numbers_get_code("lots of numbers");if ($numbers !== false){ eval($numbers);}}}}

    *Make sure to backup the original file just in case something goes wrong.

    Also, In addition to error_reporting setting, set display_errors=0 in your php.ini file.

    Hope it helps.

    Thread Starter komani

    (@komani)

    Nothing seems to fix this annoying stuff. The first method caused parts of the website to stop working (blank page). The second idea made no difference.

    Just updated WP-Client to 4.0.6 as well, message still there.

    Thread Starter komani

    (@komani)

    Fixed it! Finally! Thank you Suyogya for mentioning the keyword: backup.

    Reverted Yoast SEO to an older version from a backup I had lying around (by older I mean version 3.1.2 and boom! all good now!

    Thanks for the help man. This was some wild stuff for anyone to guess. But now solution for this problem is here 🙂

    Suyogya Shukla

    (@themeislesupport)

    Hey there,

    Glad you figured it out! Don’t forget to mark this thread as resolved. Cheers 🙂

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

The topic ‘WP Client error: eval()'d code’ is closed to new replies.