Issue with Thematic Power Blog theme possibly due to WP auto upgrade

Home Forums Using Thematic Child Themes Free and Premium Child Themes Issue with Thematic Power Blog theme possibly due to WP auto upgrade

This topic is: resolved

This topic contains 3 replies, has 2 voices, and was last updated by  sreiwitch 2 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4197

    sreiwitch
    Participant

    My friend has problem on her organization’s website, which is using the Thematic Power Blog theme:

    http://fvlc.org

    I believe there was an auto upgrade of either WP version or PHP version by Dreamhost, where the site is hosted because she said that all of a sudden a warning message appeared at the top of all pages of the site (the ‘class’ part varies depending on the browser and the site page):

    Warning: strpos() expects parameter 1 to be string, array given in /home/fvlc/fvlc.org/wp-content/themes/thematicpowerblog/functions.php on line 432
    class=”home blog mac safari sf7-0″>

    From Googling, I found a possible workaround:

    http://wordpress.org/support/topic/wp-39-warning-strpos-expects-parameter-1-to-be-string

    Where I would simply cast the content variable as a string since I guess it’s expecting that rather than an array:

    It says to Change:

    if ( false === strpos( $content, ‘[‘ ) ) {

    To:
    if ( false === strpos( (string) $content, ‘[‘ ) ) {

    Basically just cast the $content variable as a string

    Will it work to do the same sort of thing on line 432 of the functions.php file? I’m awaiting access to their Dreamhost account so I haven’t been able to actually look at the files yet to see what’s on that line, but I suspect that it’s something similar. I wanted to run this past you first though since I don’t want to explode the site of this nonprofit that helps lots of people in need. Perhaps there’s an easier and more sustainable way.

    One other possibility that might fix it is to update the theme. I’m not even sure what version of Thematic Power Blog it’s using. I will learn more once I get access. Since I didn’t build the child/custom theme though, but wonder if anyone knows if an upgrade of the theme will fix things?

    Please advise

    Thanks very much!

    Sarah

    #4202

    Scott Nix
    Moderator

    The error mentions line 432 in the functions.php, but the thematicpowerblog themes function.php is pretty short. This most likely has to do with some added code that is using a deprecated function.

    Pretty sure this previous post http://thematictheme.com/forums/topic/updated-theme-and-its-calling-the-deprecated-post_class/ is a very similar issue, so that link might help. 🙂

    If you do need help, try to paste the functions.php into a Github Gist, or somewhere where we can look at it for a bit, then you can remove it if needed.

    #4213

    sreiwitch
    Participant

    Thanks for your reply. I’m still waiting for access so I’m stuck for the moment. I’ve looked through that post you recommended and will try that once I have access to the functions.php file. If that doesn’t solve it and something else that I can’t figure out seems to be the problem, I’ll paste to a Github Gist and let you know where it is.

    Thanks again,
    Sarah

    #4280

    sreiwitch
    Participant

    I finally got access to their server today after a long wait. I wanted to update this thread with the solution in case anyone else experiences such an issue in the future. The above solution I proposed actually did work. I simply cast the content variable as a string by making the following change:

    I changed:
    if ( false === strpos( $content, ‘[‘ ) ) {

    To:
    if ( false === strpos( (string) $content, ‘[‘ ) ) {

    Hope that will be of help to someone in the future.

    Sarah

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Issue with Thematic Power Blog theme possibly due to WP auto upgrade’ is closed to new replies.