@@ -47,7 +47,7 @@ PHAR_FUNC(phar_opendir) /* {{{ */
4747
4848 /* we are checking for existence of a file within the relative path. Chances are good that this is
4949 retrieving something from within the phar archive */
50- if (!zend_string_starts_with_literal_ci (fname , "phar://" )) {
50+ if (!fname || ! zend_string_starts_with_literal_ci (fname , "phar://" )) {
5151 goto skip_phar ;
5252 }
5353
@@ -96,7 +96,7 @@ static zend_string* phar_get_name_for_relative_paths(zend_string *filename, bool
9696
9797 /* we are checking for existence of a file within the relative path. Chances are good that this is
9898 retrieving something from within the phar archive */
99- if (!zend_string_starts_with_literal_ci (fname , "phar://" )) {
99+ if (!fname || ! zend_string_starts_with_literal_ci (fname , "phar://" )) {
100100 return NULL ;
101101 }
102102
@@ -497,7 +497,7 @@ static void phar_file_stat(const char *filename, size_t filename_length, int typ
497497
498498 /* we are checking for existence of a file within the relative path. Chances are good that this is
499499 retrieving something from within the phar archive */
500- if (!zend_string_starts_with_literal_ci (fname , "phar://" )) {
500+ if (!fname || ! zend_string_starts_with_literal_ci (fname , "phar://" )) {
501501 goto skip_phar ;
502502 }
503503
@@ -748,7 +748,7 @@ PHAR_FUNC(phar_is_file) /* {{{ */
748748
749749 /* we are checking for existence of a file within the relative path. Chances are good that this is
750750 retrieving something from within the phar archive */
751- if (!zend_string_starts_with_literal_ci (fname , "phar://" )) {
751+ if (!fname || ! zend_string_starts_with_literal_ci (fname , "phar://" )) {
752752 goto skip_phar ;
753753 }
754754
@@ -814,7 +814,7 @@ PHAR_FUNC(phar_is_link) /* {{{ */
814814
815815 /* we are checking for existence of a file within the relative path. Chances are good that this is
816816 retrieving something from within the phar archive */
817- if (!zend_string_starts_with_literal_ci (fname , "phar://" )) {
817+ if (!fname || ! zend_string_starts_with_literal_ci (fname , "phar://" )) {
818818 goto skip_phar ;
819819 }
820820
0 commit comments