Skip to content

Commit d2c6bbe

Browse files
committed
Improve Hook Registry callback hashing
1 parent 3957456 commit d2c6bbe

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

includes/util/class-hook-registry.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ private static function callback_to_string( $callback ) {
238238

239239
if ( is_array( $callback ) ) {
240240
if ( is_object( $callback[0] ) ) {
241-
return get_class( $callback[0] ) . '::' . $callback[1];
241+
$object_hash = spl_object_hash( $callback[0] );
242+
return get_class( $callback[0] ) . '#' . $object_hash . '::' . $callback[1];
242243
}
243244
return $callback[0] . '::' . $callback[1];
244245
}

0 commit comments

Comments
 (0)