I came across one page that gave this notice (yes it is only a notice, but I hate notices in my code almost as much as errors):
Notice: Undefined offset: 50 in /home/c/6/3/22238/22238/public_html/content_mgt/plugins/pi.eexcerpt.php on line 80
The code at line 80 is
for ($i = 0; $i < $stop_after + 1; $i++)
{
$str .= $word[$i]." ";
}
Changing line 79-81 to the following fixes the notice. Presumably since $word is an array of words and $stop_after is the number set in the tag pair, if $stop_after happens to hit exactly the number of words being checked, then the for loop would exceed the $word array by one, giving the notice above. I might be way off base, but removing the +1 fixed my notice issue:
for ($i = 0; $i < $stop_after; $i++)
{
$str .= $word[$i]." ";
}
Sorry, I looked at the header of the file and saw
ExpressionEngine - by pMachine
-----------------------------------------------------
http://www.pmachine.com/
-----------------------------------------------------
Copyright (c) 2003 pMachine, Inc.
Now I see further down:
Based on: pi.word_limit_plus.php Modified: 02 26 2007 by Ryan Masuga
Thanks for moving this for me.
I was having a similar issue, Ryan updated his plugin just last Friday. Read the last 2-4 posts on this message and download his new plugin from GitHub. It works beautifully for me now.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.