From: <var...@us...> - 2012-12-03 12:43:26
|
Revision: 8589 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8589&view=rev Author: vargenau Date: 2012-12-03 12:43:20 +0000 (Mon, 03 Dec 2012) Log Message: ----------- Add "@" to avoid warning with "{{(*y)}}" Modified Paths: -------------- trunk/lib/InlineParser.php Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2012-12-03 12:41:21 UTC (rev 8588) +++ trunk/lib/InlineParser.php 2012-12-03 12:43:20 UTC (rev 8589) @@ -1392,10 +1392,13 @@ function _parse_markup_body($markup, $match, &$text, $end_regexps) { - if (isa($markup, 'SimpleMarkup')) + if (isa($markup, 'SimpleMarkup')) { return true; // Done. SimpleMarkup is simple. + } - if (!is_object($markup)) return false; // Some error: Should assert + if (!is_object($markup)) { + return false; // Some error: Should assert + } array_unshift($end_regexps, $markup->getEndRegexp($match)); // Optimization: if no end pattern in text, we know the @@ -1403,8 +1406,9 @@ // e.g. when text is "*lots *of *start *delims *with // *no *matching *end *delims". $ends_pat = "/(?:" . join(").*(?:", $end_regexps) . ")/xs"; - if (!preg_match($ends_pat, $text)) + if (!@preg_match($ends_pat, $text)) { // Add "@" to avoid warning with "{{(*y)}}" return false; + } return $this->parse($text, $end_regexps); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |