Before the zval -> zend_object migration, this code used macros like FORMATTER_METHOD_FETCH_OBJECT_NO_CHECK, which internally clear the error. Now that they are no longer used, we need to manually clear the error.