Bug #79992 [NEW]: register_shutdown_function(): Invalid shutdown callback

From: Date: Tue, 18 Aug 2020 20:50:40 +0000
Subject: Bug #79992 [NEW]: register_shutdown_function(): Invalid shutdown callback
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228653@lists.php.net to get a copy of this message
From:             ASchmidt at Anamera dot net
Operating system: Windows x64 IIS
PHP version:      7.4.9
Package:          opcache
Bug Type:         Bug
Bug description:register_shutdown_function(): Invalid shutdown callback

Description:
------------
register_shutdown_function for existing class method will result in
warning 
"PHP Warning:  register_shutdown_function(): Invalid shutdown callback"

In two other scenarios, existing instance method is reported as
non-existing:
"Error: Call to undefined method".

If I disable/bypass the two code sections that reference the existing
methods, then the rest of WordPress will load - or if I disable OPCACHE
(or if I disable error reporting).

Happens without any added third party PHP extensions, using a freshly
installed WordPress 5.5 on IIS x64 (FastCGI). Does NOT occur with PHP
7.3.21.

Test script:
---------------
// SCENARIO 1:

	if ( ! is_object( $handler ) || ! is_callable( array( $handler,
'handle' ) ) ) {
		$handler = new WP_Fatal_Error_Handler();
	}

	register_shutdown_function( array( $handler, 'handle' ) );


// SCENARIO 2:

		if ( WP_DEBUG && WP_DEBUG_DISPLAY ) {
			$this->show_errors();
		}




-- 
Edit bug report at https://bugs.php.net/bug.php?id=79992&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=79992&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=79992&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=79992&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=79992&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=79992&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=79992&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=79992&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=79992&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=79992&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=79992&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79992&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=79992&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=79992&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=79992&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=79992&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=79992&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=79992&r=mysqlcfg


Thread (6 messages)

« previous php.bugs (#228653) next »