@@ -2544,19 +2544,16 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
2544
2544
if (zend_hash_find (myht , "timezone_type" , 14 , (void * * ) & z_timezone_type ) == SUCCESS ) {
2545
2545
convert_to_long (* z_timezone_type );
2546
2546
if (zend_hash_find (myht , "timezone" , 9 , (void * * ) & z_timezone ) == SUCCESS ) {
2547
- zend_error_handling error_handling ;
2548
-
2549
- zend_replace_error_handling (EH_THROW , NULL , & error_handling TSRMLS_CC );
2550
2547
convert_to_string (* z_timezone );
2551
2548
2552
2549
switch (Z_LVAL_PP (z_timezone_type )) {
2553
2550
case TIMELIB_ZONETYPE_OFFSET :
2554
2551
case TIMELIB_ZONETYPE_ABBR : {
2555
2552
char * tmp = emalloc (Z_STRLEN_PP (z_date ) + Z_STRLEN_PP (z_timezone ) + 2 );
2556
2553
snprintf (tmp , Z_STRLEN_PP (z_date ) + Z_STRLEN_PP (z_timezone ) + 2 , "%s %s" , Z_STRVAL_PP (z_date ), Z_STRVAL_PP (z_timezone ));
2557
- php_date_initialize (* dateobj , tmp , Z_STRLEN_PP (z_date ) + Z_STRLEN_PP (z_timezone ) + 1 , NULL , NULL , 1 TSRMLS_CC );
2554
+ php_date_initialize (* dateobj , tmp , Z_STRLEN_PP (z_date ) + Z_STRLEN_PP (z_timezone ) + 1 , NULL , NULL , 0 TSRMLS_CC );
2558
2555
efree (tmp );
2559
- break ;
2556
+ return 1 ;
2560
2557
}
2561
2558
2562
2559
case TIMELIB_ZONETYPE_ID :
@@ -2570,15 +2567,10 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
2570
2567
tzobj -> tzi .tz = tzi ;
2571
2568
tzobj -> initialized = 1 ;
2572
2569
2573
- php_date_initialize (* dateobj , Z_STRVAL_PP (z_date ), Z_STRLEN_PP (z_date ), NULL , tmp_obj , 1 TSRMLS_CC );
2570
+ php_date_initialize (* dateobj , Z_STRVAL_PP (z_date ), Z_STRLEN_PP (z_date ), NULL , tmp_obj , 0 TSRMLS_CC );
2574
2571
zval_ptr_dtor (& tmp_obj );
2575
- break ;
2576
- default :
2577
- zend_restore_error_handling (& error_handling TSRMLS_CC );
2578
- return 0 ;
2572
+ return 1 ;
2579
2573
}
2580
- zend_restore_error_handling (& error_handling TSRMLS_CC );
2581
- return 1 ;
2582
2574
}
2583
2575
}
2584
2576
}
0 commit comments