diff --git a/NEWS b/NEWS index ebd284b87f2..f7eaef05355 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,9 @@ PHP NEWS - FFI: . Fixed incorrect bitshifting and masking in ffi bitfield. (nielsdos) +- Opcache: + . Fix incorrect page_size check. (nielsdos) + - Standard: . Fixed bug GH-10292 (Made the default value of the first param of srand() and mt_srand() unknown). (kocsismate) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 99bb33573f3..1ffd6cb3e5d 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -3197,7 +3197,7 @@ static zend_result accel_post_startup(void) size_t page_size; page_size = zend_get_page_size(); - if (!page_size && (page_size & (page_size - 1))) { + if (!page_size || (page_size & (page_size - 1))) { zend_accel_error_noreturn(ACCEL_LOG_FATAL, "Failure to initialize shared memory structures - can't get page size."); abort(); }