@@ -709,7 +709,6 @@ static bool nr_drupal_hook_attribute_instrument(zval* module_handler) {
709
709
NR_PHP_WRAPPER (nr_drupal8_module_handler ) {
710
710
zend_class_entry * ce = NULL ;
711
711
zval * * retval_ptr = NR_GET_RETURN_VALUE_PTR ;
712
- bool hook_attribute_instrumentation = false;
713
712
714
713
NR_UNUSED_SPECIALFN ;
715
714
(void )wraprec ;
@@ -731,26 +730,23 @@ NR_PHP_WRAPPER(nr_drupal8_module_handler) {
731
730
732
731
ce = Z_OBJCE_P (* retval_ptr );
733
732
734
- hook_attribute_instrumentation
735
- = nr_drupal_hook_attribute_instrument (* retval_ptr );
736
-
737
- if (!hook_attribute_instrumentation ) {
738
- nr_drupal8_add_method_callback (
739
- ce , NR_PSTR ("getimplementations" ),
740
- nr_drupal8_post_get_implementations TSRMLS_CC );
741
- nr_drupal8_add_method_callback (ce , NR_PSTR ("implementshook" ),
742
- nr_drupal8_post_implements_hook TSRMLS_CC );
743
- /* Drupal 9.4 introduced a replacement method for getImplentations */
733
+ if (nr_drupal_hook_attribute_instrument (* retval_ptr )) {
734
+ NR_PHP_WRAPPER_LEAVE ;
735
+ }
736
+ nr_drupal8_add_method_callback (ce , NR_PSTR ("getimplementations" ),
737
+ nr_drupal8_post_get_implementations TSRMLS_CC );
738
+ nr_drupal8_add_method_callback (ce , NR_PSTR ("implementshook" ),
739
+ nr_drupal8_post_implements_hook TSRMLS_CC );
740
+ /* Drupal 9.4 introduced a replacement method for getImplentations */
744
741
#if ZEND_MODULE_API_NO >= ZEND_8_0_X_API_NO \
745
742
&& !defined OVERWRITE_ZEND_EXECUTE_DATA
746
- nr_drupal8_add_method_callback_before_after_clean (
747
- ce , NR_PSTR ("invokeallwith" ), nr_drupal94_invoke_all_with ,
748
- nr_drupal94_invoke_all_with_after , nr_drupal94_invoke_all_with_clean );
743
+ nr_drupal8_add_method_callback_before_after_clean (
744
+ ce , NR_PSTR ("invokeallwith" ), nr_drupal94_invoke_all_with ,
745
+ nr_drupal94_invoke_all_with_after , nr_drupal94_invoke_all_with_clean );
749
746
#else
750
- nr_drupal8_add_method_callback (ce , NR_PSTR ("invokeallwith" ),
751
- nr_drupal94_invoke_all_with TSRMLS_CC );
747
+ nr_drupal8_add_method_callback (ce , NR_PSTR ("invokeallwith" ),
748
+ nr_drupal94_invoke_all_with TSRMLS_CC );
752
749
#endif
753
- }
754
750
}
755
751
NR_PHP_WRAPPER_END
756
752
0 commit comments