Hi! I started testing around a bit using the private comment feature and came upon an interesting issue which I can't figure out.
The scenario is like this:
User A leaves a private comment on a product created by User B.
User A and User B can both see the comment without issue.
User C, who does not have access to view the comment, enters the page of the product containing the above comment.
Result: Error 500 with the below error in the server log:
Backend fatal error: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 53248 bytes) in /home4/mysecretpath/public_html/websitename/wp-includes/functions.php on line 5219\n, referer: https://www.mysecrethost.com/shop/
On L5219 in functions.php mentioned above is this:
/**
* Flush all output buffers for PHP 5.2.
*
* Make sure all output buffers are flushed before our singletons are destroyed.
*
* @since 2.2.0
*/
function wp_ob_end_flush_all() {
$levels = ob_get_level();
for ( $i = 0; $i < $levels; $i++ ) {
ob_end_flush(); // here is line 5219
}
}
It looks like this could be some follow-up error, but it's what is shown in the error log in the cpanel.
Note that the issue goes away if the comment is deleted or made public.
I have tried resetting the settings both for the private comment tab and for the whole plugin, but still run into the same issue.
Any ideas what could cause this?
Thanks a lot in advance!
// Johan