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