Opened 5 years ago
Last modified 5 years ago
#48973 new defect (bug)
wp_text_diff() out of memory with 10GB memory limit on certain revisions
Reported by: | justjack1 | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.3.1 |
Component: | Revisions | Keywords: | |
Focuses: | administration | Cc: |
Description
Hi,
I have identified a bug with wp_text_diff on a blank WP install on PHP 7.2.8 and 7.3.12
The bug causes the system to run out of memory no matter how much is available. I found it while trying to edit some revisions. The texts are large (50KB), maybe it has something to do with it.
To replicate the bug you need to use this code. I will provide the files.
<?php $content_from = file_get_contents( ABSPATH . '/content_from.txt' ); $content_to = file_get_contents( ABSPATH . '/content_to.txt' ); $diff = wp_text_diff( $content_from, $content_to, [] );
}}}
Attachments (1)
Change History (2)
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
5 years ago
Note: See
TracTickets for help on using
tickets.
Archive contains two files with HTML text to be used in testing the bug