@@ -2575,12 +2575,9 @@ static int php_date_initialize_from_hash(php_date_obj **dateobj, HashTable *myht
2575
2575
timelib_tzinfo * tzi ;
2576
2576
php_timezone_obj * tzobj ;
2577
2577
2578
- if (zend_hash_find (myht , "date" , 5 , (void * * ) & z_date ) == SUCCESS ) {
2579
- convert_to_string (* z_date );
2580
- if (zend_hash_find (myht , "timezone_type" , 14 , (void * * ) & z_timezone_type ) == SUCCESS ) {
2581
- convert_to_long (* z_timezone_type );
2582
- if (zend_hash_find (myht , "timezone" , 9 , (void * * ) & z_timezone ) == SUCCESS ) {
2583
- convert_to_string (* z_timezone );
2578
+ if (zend_hash_find (myht , "date" , 5 , (void * * ) & z_date ) == SUCCESS && Z_TYPE_PP (z_date ) == IS_STRING ) {
2579
+ if (zend_hash_find (myht , "timezone_type" , 14 , (void * * ) & z_timezone_type ) == SUCCESS && Z_TYPE_PP (z_timezone_type ) == IS_LONG ) {
2580
+ if (zend_hash_find (myht , "timezone" , 9 , (void * * ) & z_timezone ) == SUCCESS && Z_TYPE_PP (z_timezone ) == IS_STRING ) {
2584
2581
2585
2582
switch (Z_LVAL_PP (z_timezone_type )) {
2586
2583
case TIMELIB_ZONETYPE_OFFSET :
@@ -2595,7 +2592,6 @@ static int php_date_initialize_from_hash(php_date_obj **dateobj, HashTable *myht
2595
2592
2596
2593
case TIMELIB_ZONETYPE_ID : {
2597
2594
int ret ;
2598
- convert_to_string (* z_timezone );
2599
2595
2600
2596
tzi = php_date_parse_tzfile (Z_STRVAL_PP (z_timezone ), DATE_TIMEZONEDB TSRMLS_CC );
2601
2597
0 commit comments