WordPress.org

Ready to get started?Download WordPress

Forums

[P2 BUG 001] when post starts with url title is zero (9 posts)

  1. cogmios
    Member
    Posted 5 years ago #

    ErrorMessage: Warning: str_split() [function.str-split]: The length of each segment must be greater than zero in XXX/wp-content/themes/p2/functions.php on line 354

    description: my post started with a url making the title "http://www.meninos.us/categories.php?cat..."

    So i think the split in functions.php now has a zero length bit. in that piece of code there is no check if the result is FALSE of the split. I think it should be added.

  2. Tosh
    Member
    Posted 5 years ago #

    Is there a fix for this?

  3. noel
    Member
    Posted 5 years ago #

    It's a relatively harmless error, however it will be fixed in the next release.

    If you want to change str_split( to @str_split on line 354 of functions.php that should solve the problem.

  4. OperaManiac
    Member
    Posted 4 years ago #

    $split2 = str_split( $post->post_title, strpos($post->post_title, 'http'));

    can you explain the fix? i installed the latest copy from extend and i face the same problem...

    i cannot get what you are telling to change in this line...

  5. Samuel B
    moderator
    Posted 4 years ago #

    this
    str_split

    to this
    @str_split

    entire line would look like
    $split2 = @str_split( $post->post_title, strpos($post->post_title, 'http'));

  6. OperaManiac
    Member
    Posted 4 years ago #

    still face the same problem at: http://sushubh.com/

    running 2.8.4.

  7. OperaManiac
    Member
    Posted 4 years ago #

    ok managed to fix it. thanks!

  8. abcde666
    Member
    Posted 4 years ago #

    when will be the next release ?

  9. noel
    Member
    Posted 4 years ago #

    @erich73 - along with the 2.9 WP release :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags