Ticket #4239 (closed defect (bug): fixed)

Opened 5 years ago

Last modified 5 years ago

PREG_BACKTRACK_LIMIT_ERROR encountered during WP import

Reported by: ryan Owned by: ryan
Priority: normal Milestone: 2.2
Component: Administration Version: 2.2
Severity: normal Keywords: wxr importer preg
Cc:

Description

The WordPress importer uses preg_match_all to slurp items from the import file. Large items can cause a PREG_BACKTRACK_LIMIT_ERROR. This can be avoided by bumping pcre.backtrack_limit, but that isn't very friendly. Instead, the importer shouldn't use preg_match_all. There are other ways of retrieving the items.

 http://us2.php.net/manual/en/ref.pcre.php#pcre.constants  http://us2.php.net/manual/en/ref.pcre.php#ini.pcre.backtrack-limit

Attachments

no_pref.diff Download (1.7 KB) - added by ryan 5 years ago.

Change History

ryan5 years ago

comment:1   matt5 years ago

omgbbqphp.

+1

comment:3   ryan5 years ago

  • Status changed from new to closed
  • Resolution set to fixed

(In [5422]) Don't preg_match_all when processing items. fixes #4239 for 2.2

comment:4   ryan5 years ago

(In [5423]) Don't preg_match_all when processing items. fixes #4239 for 2.3

comment:5   ryan5 years ago

Testing went well, so I committed for 2.2 since this bug sucks for those affected.

Note: See TracTickets for help on using tickets.