Forums

Offset not contained in string? (8 posts)

  1. mycoachkennedy
    Member
    Posted 2 years ago #

    Hello,

    I'm a newbie and trying to get this problem resolved:

    Warning: strpos() [function.strpos]: Offset not contained in string in /home/content/32/4437032/html/shoesfordiabeticguide/shoesfordiabetics/wp-content/themes/magasin-siete/functions.php on line 280

    Any ideas on how I can fixed this problem?

    Thanks in advance for your assistance. Have a great day!

  2. Christian Schenk
    Member
    Posted 2 years ago #

    Try adding the following line just above line 280 in functions.php:

    if (strlen($content) <= $max_char) $max_char = strlen($content);

    Anyway, I suggest you tell the theme's author about this problem. I'm sure he'll fix this in a future release.

  3. mycoachkennedy
    Member
    Posted 2 years ago #

    Hi Chschenk,

    Thanks for your tip. I did give it a go but received this error message:

    Parse error: syntax error, unexpected T_IF in /home/content/32/4437032/html/shoesfordiabeticguide/shoesfordiabetics/wp-content/themes/magasin-siete/functions.php on line 280

    I emailed the theme author but haven't received a reply yet.

    Thanks for making the effort to help me out. Have a great day.

  4. Christian Schenk
    Member
    Posted 2 years ago #

    The corresponding snippet should look like the following:

    function themefunction_content(...) {
    ...
    $content = strip_tags($content);

    if (strlen($content) <= $max_char) $max_char = strlen($content);
    $space = strpos($content," ",$max_char);
    if (strlen($_GET['p']) > 0) {
    ...

    If you can't manage to fix this yourself, contact me and I'll have a more detailed look.

  5. mycoachkennedy
    Member
    Posted 2 years ago #

    chschenk,

    Thank you so much for your reply. I'm going to save your problem solving tip. Out of frustration, I switched to another template but I could become motivated to return to the former.

    Thanks again for your assistance. Have a great day!

  6. orangej568
    Member
    Posted 2 years ago #

    I ran into the same problem and applied the code that you suggested mycoachkennedy and it worked great! Thanks!

  7. tigger86
    Member
    Posted 2 years ago #

    I ran into the same problem with the magasin-dos theme, and this solution cleared the problem up. Thanks chschenk. Now if only I could solve the rest of my problems so easily.

  8. kalengirl
    Member
    Posted 2 years ago #

    I add the code chschenk posted above and it fix the problem in my website.
    Thanks!!

Topic Closed

This topic has been closed to new replies.

About this Topic