Permalink
Browse files

Documentation / Comments to mark potential PCRE issue with relative U…

…RI resolution on very long posts.
  • Loading branch information...
Charles Johnson
Charles Johnson committed May 14, 2015
1 parent 7ab48e2 commit 7b2d54ea0d6515530d5adf6c699b4eb8dd97ca62
Showing with 6 additions and 0 deletions.
  1. +6 −0 syndicatedpost.class.php
View
@@ -1239,11 +1239,17 @@ static function resolve_relative_uris ($content, $obj) {
foreach ($obj->uri_attrs as $pair) :
list($tag, $attr) = $pair;
$pattern = FeedWordPressHTML::attributeRegex($tag, $attr);
// FIXME: Encountered issue while testing an extremely long (= 88827 characters) item
// Relying on preg_replace_callback() here can cause a PHP seg fault on my development
// server. preg_match_all() causes a similar problem. Apparently this is a PCRE issue
// Cf. discussion of similar issue <https://bugs.php.net/bug.php?id=65009>
$content = preg_replace_callback (
$pattern,
array($obj, 'resolve_single_relative_uri'),
$content
);
endforeach;
endif;

0 comments on commit 7b2d54e

Please sign in to comment.