• Resolved hiroprot

    (@hiroprot)


    Hi Jeff,

    I reported this issue a while ago with another one here. That second problem was fixed, but this one persists even with version 2.5 of the plugin.

    Full message in Apache’s error.log:

    preg_split() expects parameter 2 to be string, array given in /wp-content/plugins/prismatic/inc/prismatic-core.php on line 56

    and

    PHP Warning: count(): Parameter must be an array or an object that implements Countable in /wp-content/plugins/prismatic/inc/prismatic-core.php on line 57

    This is what line 56 of prismatic-core.php looks like:

    $split = preg_split("/(\[prismatic_encoded.*\].*\[\/prismatic_encoded\])/Us", $text, -1, PREG_SPLIT_DELIM_CAPTURE);

    Apparently, the variable $text may contain an array in certain cases.

    Note: as indicated in my earlier post, this might occur in conjunction with ACF Pro.

    • This topic was modified 4 years, 4 months ago by hiroprot.
    • This topic was modified 4 years, 4 months ago by hiroprot.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Thanks have added to the to-do list and will try to resolve for the next update.

    Plugin Author Jeff Starr

    (@specialk)

    I *think* I’ve got this fixed in the next version of the plugin. Should be available this week.

    Note that I don’t have ACF Pro, so can’t really test the results. But I improved the code logic and think it should be sorted. Please test and let me know either way. Thank you.

    Thread Starter hiroprot

    (@hiroprot)

    Awesome, thank you so much! This should get my Apache server errors down from ~1000 per week to less than ten (I hope).

    I’ll let you know if I notice anything after upgrading.

    Thread Starter hiroprot

    (@hiroprot)

    I am happy to confirm that version 2.6 fixes the issue. The number of errors in the Apache log went down from nearly 1,000 to 60 per week, and those remaining 60 have nothing to do with this awesome plugin.

    Thanks, Jeff!

    Plugin Author Jeff Starr

    (@specialk)

    You are very welcome, @hiroprot!

    • This reply was modified 4 years, 4 months ago by Jeff Starr.
    • This reply was modified 4 years, 4 months ago by Jeff Starr.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Warning: preg_split() expects parameter 2 to be string, array given’ is closed to new replies.