Strstr() expects parameter 1 to be string error in wp-includes/functions.php

This topic has 6 replies, 2 voices, and was last updated 6 years, 8 months ago ago by Laranz

  • Avatar: motografik
    motografik
    Participant
    August 23, 2017 at 15:51

    URL: https://www.tomanperformance.com/store/engine-components/

    Steps to replicate the error:
    – Choose vehicle from sidebar (like Nissan, R35 GT-R), then hit submit
    – Navigate back to a product category like “Engine Components” and you’ll see the following errors:

    Warning: strstr() expects parameter 1 to be string, object given in /home/tomanperformance/tomanperformance.com/wp-includes/functions.php on line 785
    
    Warning: stripos() expects parameter 1 to be string, object given in /home/tomanperformance/tomanperformance.com/wp-includes/functions.php on line 790
    
    Warning: stripos() expects parameter 1 to be string, object given in /home/tomanperformance/tomanperformance.com/wp-includes/functions.php on line 793
    
    Warning: strpos() expects parameter 1 to be string, object given in /home/tomanperformance/tomanperformance.com/wp-includes/functions.php on line 800
    
    Warning: explode() expects parameter 2 to be string, object given in /home/tomanperformance/tomanperformance.com/wp-includes/functions.php on line 801
    
    Warning: strstr() expects parameter 1 to be string, object given in /home/tomanperformance/tomanperformance.com/wp-includes/functions.php on line 785
    
    Warning: stripos() expects parameter 1 to be string, object given in /home/tomanperformance/tomanperformance.com/wp-includes/functions.php on line 790
    
    Warning: stripos() expects parameter 1 to be string, object given in /home/tomanperformance/tomanperformance.com/wp-includes/functions.php on line 793
    
    Warning: strpos() expects parameter 1 to be string, object given in /home/tomanperformance/tomanperformance.com/wp-includes/functions.php on line 800
    
    Warning: explode() expects parameter 2 to be string, object given in /home/tomanperformance/tomanperformance.com/wp-includes/functions.php on line 801

    I talked to another developer and they said:

    Yes I see the issue with theme’s woo.php file. They are doing something with WooCommerce’s default filters using:
    woocommerce_before_shop_loop

    error

    Please, contact administrator
    for this information.
    5 Answers
    Avatar: laranz
    Laranz
    Participant
    August 24, 2017 at 14:13

    Hi,

    It seems it is related to some URL issues, what happen if you using parent theme or a default storefront theme https://wordpress.org/themes/storefront/ ? Still it has the same error?

    Can you pass us the WP and FTP Login details, so that we can check what is going wrong.

    Let us know,

    Thanks,
    laranz.

    Avatar: motografik
    motografik
    Participant
    August 24, 2017 at 15:20

    FTP and WP details are in the private content in the original post. I tested out the Storefront theme and default 2017 theme and the error goes away. So it has something to do with your theme.

    Avatar: laranz
    Laranz
    Participant
    August 25, 2017 at 06:05

    Hi,

    The WP Login didnt’ work, can you try that: also what happens if you turn of WP_DEBUG in wp-config.php https://codex.wordpress.org/WP_DEBUG

    Let us know,

    Thanks,
    laranz.

    Avatar: motografik
    motografik
    Participant
    August 25, 2017 at 17:01

    I just tested it out and the credentials work fine. Make sure you grabbing all the characters in the password.

    I enabled debug mode and here’s what it came up with:

    WARNING: wp-includes/functions.php:785 - strstr() expects parameter 1 to be string, object given
    require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/woocommerce/templates/taxonomy-product_cat.php'), wc_get_template, include('/themes/xstore/woocommerce/archive-product.php'), do_action('woocommerce_before_shop_loop'), WP_Hook->do_action, WP_Hook->apply_filters, etheme_grid_list_switcher, remove_query_arg, add_query_arg, strstr
    
    WARNING: wp-includes/functions.php:790 - stripos() expects parameter 1 to be string, object given
    require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/woocommerce/templates/taxonomy-product_cat.php'), wc_get_template, include('/themes/xstore/woocommerce/archive-product.php'), do_action('woocommerce_before_shop_loop'), WP_Hook->do_action, WP_Hook->apply_filters, etheme_grid_list_switcher, remove_query_arg, add_query_arg, stripos
    
    WARNING: wp-includes/functions.php:793 - stripos() expects parameter 1 to be string, object given
    require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/woocommerce/templates/taxonomy-product_cat.php'), wc_get_template, include('/themes/xstore/woocommerce/archive-product.php'), do_action('woocommerce_before_shop_loop'), WP_Hook->do_action, WP_Hook->apply_filters, etheme_grid_list_switcher, remove_query_arg, add_query_arg, stripos
    
    WARNING: wp-includes/functions.php:800 - strpos() expects parameter 1 to be string, object given
    require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/woocommerce/templates/taxonomy-product_cat.php'), wc_get_template, include('/themes/xstore/woocommerce/archive-product.php'), do_action('woocommerce_before_shop_loop'), WP_Hook->do_action, WP_Hook->apply_filters, etheme_grid_list_switcher, remove_query_arg, add_query_arg, strpos
    
    WARNING: wp-includes/functions.php:801 - explode() expects parameter 2 to be string, object given
    require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/woocommerce/templates/taxonomy-product_cat.php'), wc_get_template, include('/themes/xstore/woocommerce/archive-product.php'), do_action('woocommerce_before_shop_loop'), WP_Hook->do_action, WP_Hook->apply_filters, etheme_grid_list_switcher, remove_query_arg, add_query_arg, explode
    Avatar: laranz
    Laranz
    Participant
    August 25, 2017 at 23:28

    Hi,

    Keep the login intact, I forward this issue to our development team.

    Thanks for your patience.

    Regards,

  • Viewing 6 results - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.