@@ -620,7 +620,6 @@ NR_PHP_WRAPPER(nr_laravel_queue_worker_process) {
620620 if (EG (exception )) {
621621 zval * exception_zval = NULL ;
622622
623- #if ZEND_MODULE_API_NO >= ZEND_7_0_X_API_NO /* PHP 7.0+ */
624623 /*
625624 * On PHP 7, EG(exception) is stored as a zend_object, and is only wrapped
626625 * in a zval when it actually needs to be. Unfortunately, our error handling
@@ -640,12 +639,6 @@ NR_PHP_WRAPPER(nr_laravel_queue_worker_process) {
640639
641640 ZVAL_OBJ (& exception , EG (exception ));
642641 exception_zval = & exception ;
643- #else
644- /*
645- * On PHP 5, the exception is just a regular old zval.
646- */
647- exception_zval = EG (exception );
648- #endif /* PHP7+ */
649642
650643 nr_php_error_record_exception (
651644 NRPRG (txn ), exception_zval , NR_PHP_ERROR_PRIORITY_UNCAUGHT_EXCEPTION ,
@@ -835,13 +828,8 @@ NR_PHP_WRAPPER(nr_laravel_queue_queue_createpayload) {
835828 /*
836829 * Finally, we change the string in the return value to our new JSON.
837830 */
838- #if ZEND_MODULE_API_NO >= ZEND_7_0_X_API_NO /* PHP 7.0+ */
839831 zend_string_free (Z_STR_P (* retval_ptr ));
840832 Z_STR_P (* retval_ptr ) = zend_string_copy (Z_STR_P (json ));
841- #else
842- efree (Z_STRVAL_PP (retval_ptr ));
843- nr_php_zval_str_len (* retval_ptr , Z_STRVAL_P (json ), Z_STRLEN_P (json ));
844- #endif /* PHP7+ */
845833
846834end :
847835 nr_php_zval_free (& payload );
0 commit comments