We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
N/A
Memory Issue: wc_bookings_get_block_minutes_array
In the standard WC Bookings use case, adding increments of minutes to an array is acceptable as most bookings will be less than a few hours.
However, for accommodations, this can cause a PHP memory leak as bookings can be multiple days or even months.
function wc_bookings_get_block_minutes_array( $block, $interval ) { $block_array = []; for( $i = 0; $i < $interval; $i++ ) { /* This can get too large and cause memory errors */ $block_array[ $block + ( $i * MINUTE_IN_SECONDS ) ] = 0; } return $block_array; }
Usual error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 167772160 bytes)
See above code block, simply use a large enough time range for an accommodation product.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Affected ticket(s)
N/A
What I expected
N/A
What happened instead
Memory Issue: wc_bookings_get_block_minutes_array
In the standard WC Bookings use case, adding increments of minutes to an array is acceptable as most bookings will be less than a few hours.
However, for accommodations, this can cause a PHP memory leak as bookings can be multiple days or even months.
Usual error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 167772160 bytes)
Steps to reproduce the issue
See above code block, simply use a large enough time range for an accommodation product.
The text was updated successfully, but these errors were encountered: