WordPress.org

Support

Support » How-To and Troubleshooting » Catchable fatal error: Object of class __PHP_Incomplete_Class could not be

Catchable fatal error: Object of class __PHP_Incomplete_Class could not be

  • Hi Guys,
    I need some help, I got this error when I try to save the changes I made in my profile.

    Catchable fatal error: Object of class __PHP_Incomplete_Class could not be converted to string in /home/”deleted”/public_html/foodcartnegosyo.com/wp-includes/functions.php on line 1463

    And the code in my function line 1463 is this.

    function add_magic_quotes( $array ) {
    	foreach ( (array) $array as $k => $v ) {
    		if ( is_array( $v ) ) {
    			$array[$k] = add_magic_quotes( $v );
    		} else {
    			$array[$k] = addslashes( $v );
    		}
    	}
    	return $array;
    }
Viewing 10 replies - 1 through 10 (of 10 total)
  • Did you manage to resolve this? If so, how? I have the same problem..

    I am also experiencing this same exact issue when trying to edit user profiles. I just want to disable the bar. disabled all plugins as well. no love 🙁

    got no luck here either.. the odd thing is when i try to update the other users profile i don’t experience this kind of error.

    I have the same problem, I deactivated my plugins etc, but no luck. I recently upgraded to WP 3.1.2, not sure if that is the problem? I do not remember having that problem before, but I usually do not edit user profiles.
    I noticed that problem first when implementing a frontend user profile page with the s2member plugin. But as this problem happens even when updating member profiles in the admin area I assume this is a WP glitch.
    Any suggestions?

    I am also having this same issue discovered today. I have been trying to isolate to any plugin but so far no luck.

    Found a solution…

    wp-includes/functions.php lines 1458 to 1469

    Replace this:

    function add_magic_quotes( $array ) {
        	global $wpdb;
    
        	foreach ( (array) $array as $k => $v ) {
        		if ( is_array( $v ) ) {
        			$array[$k] = add_magic_quotes( $v );
        		} else {
        			$array[$k] = $wpdb->escape( $v );
        		}
        	}
        	return $array;
        }

    With this:

    function add_magic_quotes( $array ) {
        	global $wpdb;
    
        	if ( is_array($array) ) {
        		foreach ( $array as $k => $v ) {
        			$array[$k] = add_magic_quotes( $v );
        		}
         	} elseif ( is_string($array) ) {
         		$array = $wpdb->escape( $array );
         	}
        	return $array;
        }

    Don’t know why this was not done in the latest version 3.1.2 If it was it was not updated on my auto upgrade. The patch takes care of the problem on my install…

    esmi

    @esmi

    Forum Moderator

    Do not edit WordPress core files unless you really, really, know what you are doing. Not only do you risk bring your whole site down, you may also be exposing it to security risks. If you think you have located a bug, post it on Trac.

    Trac updated as requested…

    esmi

    @esmi

    Forum Moderator

    Thanks 🙂

    For me the problem was fixed by checking my database tables (especially the user meta one) for entries that come from deleted plugins. After deleting those, everything worked ok again. That is the preferred option I would say, instead of modifying core files. I briefly described it here:
    http://rufer-design.tumblr.com/

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Catchable fatal error: Object of class __PHP_Incomplete_Class could not be’ is closed to new replies.