What Does This Mean?

Can someone tell me what this means?

Warning: strrpos(): Offset is greater than the length of haystack string in /srv/www/vhosts/dlib.ius.edu/omeka/application/helpers/Functions.php on line 1312

Thank you!

This is a known bug in Omeka 1.0 with certain server configurations. Most users aren't affected by it, so we're waiting until the next version of Omeka is released (we expect Omeka 1.1 to be out next month) to roll out a new version of all of Omeka's code.

In the meantime, if you're brave and you're willing to edit a file, I can share the fix. Edit the StringFunctions.php inthe application/helpers/ folder. Replace the snippet function with the following code:

/**
* Retrieve a substring of a given piece of text.
*
* Note that this will only split strings on the space character.
*
* @param string $text Text to take snippet of
* @param int $startPos Starting position of snippet in string
* @param int $endPos Maximum length of snippet
* @param string $append String to append to snippet if truncated
* @return string Snippet of given text
*/
function snippet($text, $startPos, $endPos, $append = '…')
{
$textLength = strlen($text);

// Calculate the start position. Set to zero if the start position is
// null or 0, OR if the start offset is greater than the length of the
// original text.
$startPosOffset = $startPos - $textLength;
$startPos = !$startPos || $startPosOffset > $textLength
? 0
: strrpos($text, ' ', $startPosOffset);

// Calculate the end position. Set to the length of the text if the
// end position is greater than or equal to the length of the original
// text, OR if the end offset is greater than the length of the
// original text.
$endPosOffset = $endPos - $textLength;
$endPos = $endPos >= $textLength || $endPosOffset > $textLength
? $textLength
: strrpos($text, ' ', $endPosOffset);

// Set the snippet by getting its substring.
$snippet = substr($text, $startPos, $endPos - $startPos);

// Return the snippet without the append string if the text's original
// length equals to 1) the length of the snippet, i.e. when the return
// string is identical to the passed string; OR 2) the calculated
// end position, i.e. when the return string ends at the same point as
// the passed string.
return strlen($snippet) == $textLength || $endPos == $textLength
? $snippet
: $snippet . $append;
}

Thanks a lot

John
www.donjoaoresortgoa.com