@@ -2621,7 +2621,7 @@ PHP_METHOD(Phar, delete)
2621
2621
zend_throw_exception_ex (phar_ce_PharException , 0 , "phar \"%s\" is persistent, unable to copy on write" , phar_obj -> archive -> fname );
2622
2622
RETURN_THROWS ();
2623
2623
}
2624
- if (NULL != (entry = zend_hash_str_find_ptr (& phar_obj -> archive -> manifest , fname , ( uint32_t ) fname_len ))) {
2624
+ if (NULL != (entry = zend_hash_str_find_ptr (& phar_obj -> archive -> manifest , fname , fname_len ))) {
2625
2625
if (entry -> is_deleted ) {
2626
2626
/* entry is deleted, but has not been flushed to disk yet */
2627
2627
RETURN_TRUE ;
@@ -3440,13 +3440,13 @@ PHP_METHOD(Phar, copy)
3440
3440
RETURN_THROWS ();
3441
3441
}
3442
3442
3443
- if (NULL == (oldentry = zend_hash_str_find_ptr (& phar_obj -> archive -> manifest , oldfile , ( uint32_t ) oldfile_len )) || oldentry -> is_deleted ) {
3443
+ if (NULL == (oldentry = zend_hash_str_find_ptr (& phar_obj -> archive -> manifest , oldfile , oldfile_len )) || oldentry -> is_deleted ) {
3444
3444
zend_throw_exception_ex (spl_ce_UnexpectedValueException , 0 ,
3445
3445
"file \"%s\" cannot be copied to file \"%s\", file does not exist in %s" , oldfile , newfile , phar_obj -> archive -> fname );
3446
3446
RETURN_THROWS ();
3447
3447
}
3448
3448
3449
- if (NULL != (temp = zend_hash_str_find_ptr (& phar_obj -> archive -> manifest , newfile , ( uint32_t ) newfile_len )) && !temp -> is_deleted ) {
3449
+ if (NULL != (temp = zend_hash_str_find_ptr (& phar_obj -> archive -> manifest , newfile , newfile_len )) && !temp -> is_deleted ) {
3450
3450
zend_throw_exception_ex (spl_ce_UnexpectedValueException , 0 ,
3451
3451
"file \"%s\" cannot be copied to file \"%s\", file must not already exist in phar %s" , oldfile , newfile , phar_obj -> archive -> fname );
3452
3452
RETURN_THROWS ();
@@ -3466,7 +3466,7 @@ PHP_METHOD(Phar, copy)
3466
3466
RETURN_THROWS ();
3467
3467
}
3468
3468
/* re-populate with copied-on-write entry */
3469
- oldentry = zend_hash_str_find_ptr (& phar_obj -> archive -> manifest , oldfile , ( uint32_t ) oldfile_len );
3469
+ oldentry = zend_hash_str_find_ptr (& phar_obj -> archive -> manifest , oldfile , oldfile_len );
3470
3470
}
3471
3471
3472
3472
memcpy ((void * ) & newentry , oldentry , sizeof (phar_entry_info ));
@@ -3513,8 +3513,8 @@ PHP_METHOD(Phar, offsetExists)
3513
3513
3514
3514
PHAR_ARCHIVE_OBJECT ();
3515
3515
3516
- if (zend_hash_str_exists (& phar_obj -> archive -> manifest , fname , ( uint32_t ) fname_len )) {
3517
- if (NULL != (entry = zend_hash_str_find_ptr (& phar_obj -> archive -> manifest , fname , ( uint32_t ) fname_len ))) {
3516
+ if (zend_hash_str_exists (& phar_obj -> archive -> manifest , fname , fname_len )) {
3517
+ if (NULL != (entry = zend_hash_str_find_ptr (& phar_obj -> archive -> manifest , fname , fname_len ))) {
3518
3518
if (entry -> is_deleted ) {
3519
3519
/* entry is deleted, but has not been flushed to disk yet */
3520
3520
RETURN_FALSE ;
@@ -3527,7 +3527,7 @@ PHP_METHOD(Phar, offsetExists)
3527
3527
}
3528
3528
RETURN_TRUE ;
3529
3529
} else {
3530
- if (zend_hash_str_exists (& phar_obj -> archive -> virtual_dirs , fname , ( uint32_t ) fname_len )) {
3530
+ if (zend_hash_str_exists (& phar_obj -> archive -> virtual_dirs , fname , fname_len )) {
3531
3531
RETURN_TRUE ;
3532
3532
}
3533
3533
RETURN_FALSE ;
@@ -3772,8 +3772,8 @@ PHP_METHOD(Phar, offsetUnset)
3772
3772
RETURN_THROWS ();
3773
3773
}
3774
3774
3775
- if (zend_hash_str_exists (& phar_obj -> archive -> manifest , fname , ( uint32_t ) fname_len )) {
3776
- if (NULL != (entry = zend_hash_str_find_ptr (& phar_obj -> archive -> manifest , fname , ( uint32_t ) fname_len ))) {
3775
+ if (zend_hash_str_exists (& phar_obj -> archive -> manifest , fname , fname_len )) {
3776
+ if (NULL != (entry = zend_hash_str_find_ptr (& phar_obj -> archive -> manifest , fname , fname_len ))) {
3777
3777
if (entry -> is_deleted ) {
3778
3778
/* entry is deleted, but has not been flushed to disk yet */
3779
3779
return ;
@@ -3785,7 +3785,7 @@ PHP_METHOD(Phar, offsetUnset)
3785
3785
RETURN_THROWS ();
3786
3786
}
3787
3787
/* re-populate entry after copy on write */
3788
- entry = zend_hash_str_find_ptr (& phar_obj -> archive -> manifest , fname , ( uint32_t ) fname_len );
3788
+ entry = zend_hash_str_find_ptr (& phar_obj -> archive -> manifest , fname , fname_len );
3789
3789
}
3790
3790
entry -> is_modified = 0 ;
3791
3791
entry -> is_deleted = 1 ;
0 commit comments