Opened 15 years ago
Closed 15 years ago
#10836 closed defect (bug) (fixed)
Several Importers call create_function() multiple times per imported post
Reported by: | mdawaffe | Owned by: | |
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | normal | Version: | 2.8.4 |
Component: | Import | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
The WordPress, Blogger, Blogware, LiveJournal, and RSS importers all call create_function() one or more times per post.
Importing a lot of posts means creating a lot of functions, all of which do the same thing. This can lead to fatal memory allocation errors.
Attached replaces each create_function() call with a hardcoded function.
Patch in UNTESTED.
Attachments (1)
Change History (6)
#2
@
15 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
ryan, please see the parameter is called $matches but you use $match later on. this is a minor bug I assume by copy/paste. please fix it.
532 function _normalize_tag( $matches ) { 533 return '<' . strtolower( $match[1] ); 534 }
Note: See
TracTickets for help on using
tickets.
(In [11964]) Use hard-coded functions instead of create_function() in importers. Props mdawaffe. fixes #10836