• Hi,

    An error shows…How can we solve it?

    A non-numeric value encountered in /srv/users/serverpilot/apps/wordpress/public/wp-content/plugins/schema/includes/json/schema-output.php on line 43

Viewing 1 replies (of 1 total)
  • To me this seems like a bug. I get this error after I update a page and then go to view that page. If I refresh again I don’t get the error.

    The problem seems to be that $pttimestamp_old can get set to an empty string which still returns true at the isset if statement:

    
    //
    // /wp-content/plugins/schema/includes/json/schema-output.php on line 43
    //
    if ( isset($pttimestamp_old) ) {
    	$time_diff = $pttimestamp - $pttimestamp_old;
    	if ( $time_diff <= DAY_IN_SECONDS ) {
    		$json = get_post_meta( $post->ID, '_schema_json', true );
    	} else {
    		delete_post_meta( $post->ID, '_schema_json' );
    		$json = array();
    	}
    }
    

    changing isset to !empty should make the error go away but hopefully the devs will come up with a fix in a future release.

Viewing 1 replies (of 1 total)
  • The topic ‘Error’ is closed to new replies.