0

I searched a lot and I couldn't find a similar error somewhere else. I have this error in my eshop whenever I am in the payment page and cancel the procedure. Then I redirect to this error instead of the shop page. After the error, the whole Woocommerce part of the website is not functional and I have to clear Browser history/cookies and run it again.

Catchable fatal error: Object of class __PHP_Incomplete_Class could not be converted to string in /var/www/vhosts/th16529w21.vorschauseite.eu/tourist/wp-includes/kses.php on line 1245

And this is the part of the kses.php that mentioned above:

function wp_kses_no_null( $string, $options = null ) {
    if ( ! isset( $options['slash_zero'] ) ) {
        $options = array( 'slash_zero' => 'remove' );
    }

    $string = preg_replace( '/[\x00-\x08\x0B\x0C\x0E-\x1F]/', '', $string ); //line 1245    
    if ( 'remove' == $options['slash_zero'] ) {
        $string = preg_replace( '/\\\\+0+/', '', $string );
    }

    return $string;
}

Edit: I use the plugin wirecard payment gateway for the payment. And the error raised on cancelation of the payment on this plugin.

I added an if statement to check if the $string is a string and if not print_r the variable to see what it is. This is the output:

__PHP_Incomplete_Class Object ( [__PHP_Incomplete_Class_Name] => Customweb_Payment_Authorization_ErrorMessage [userMessage:Customweb_Payment_Authorization_ErrorMessage:private] => Customweb_I18n_LocalizableString Object ( [string:Customweb_I18n_LocalizableString:private] => Payment processing canceled by customer. [arguments:Customweb_I18n_LocalizableString:private] => Array ( ) ) [backendMessage:Customweb_Payment_Authorization_ErrorMessage:private] => )

Tasos
  • 7,325
  • 18
  • 83
  • 176
  • Why didn't one of the dupes help you? – PeeHaa Sep 19 '15 at 19:06
  • 2
    http://stackoverflow.com/questions/21441566/catchable-fatal-error-object-of-class-php-incomplete-class-could-not-be-conve, http://stackoverflow.com/questions/4155967/catchable-fatal-error-object-of-class-php-incomplete-class, http://stackoverflow.com/questions/12631555/codeigniter-object-of-class-php-incomplete-class-could-not-be-converted-to-s, https://stackoverflow.com/questions/13264041/wordpress-template-catchable-fatal-error-object-of-class-php-incomplete-cl?rq=1 – PeeHaa Sep 19 '15 at 19:06
  • @PeeHaa Can you see any of the above have the same error in the file `kses.php`? Because I cannot. The same error doesn't mean that it is the same fault in every single case. And I couldn't find one related with a payment in Woocommerce. – Tasos Sep 19 '15 at 19:10
  • @Machavity Edited my question with the line 1245. – Tasos Sep 19 '15 at 19:10
  • We actually expect people to do their research. So the fact that the exact error or line is not in any of the answers doesn't mean the answers are wrong at all. – PeeHaa Sep 19 '15 at 19:12
  • I know it and as I said, I made my research. If I ended up on posting a question, it means that I couldn't fit one of the accepted answers to my case. Even because the answers was not related with my case, or I was doing something wrong. Both of the cases means that one needs help. :) If you think that one of the links you posted contain the answer and I deserve a downvote, why don't you also post the answer that will solve the problem on this question? – Tasos Sep 19 '15 at 19:17
  • you are passing in a object instead of a string in your first variable.....but its hard to tell without the relavant code..woo commerce works so its likely you have a theme or plugin conflict somewhere. – David Sep 20 '15 at 01:12
  • `$string` is not a string in this case :) – Hanky Panky Sep 21 '15 at 08:42

0 Answers0