File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -417,7 +417,7 @@ function setInputFile($file)
417417 /**
418418 * check, if file is a remote file
419419 */
420- if (eregi ( ' ^(http|ftp):// ' , substr ($ file , 0 , 10 ))) {
420+ if (preg_match ( ' / ^(http|ftp):\/\//i ' , substr ($ file , 0 , 10 ))) {
421421 if (!ini_get ('allow_url_fopen ' )) {
422422 return $ this ->
423423 raiseError ('Remote files cannot be parsed, as safe mode is enabled. ' ,
@@ -474,7 +474,7 @@ function setInput($fp)
474474 if (is_resource ($ fp )) {
475475 $ this ->fp = $ fp ;
476476 return true ;
477- } elseif (eregi ( ' ^[a-z]+:// ' , substr ($ fp , 0 , 10 ))) {
477+ } elseif (preg_match ( ' / ^[a-z]+:\/\//i ' , substr ($ fp , 0 , 10 ))) {
478478 // see if it's an absolute URL (has a scheme at the beginning)
479479 return $ this ->setInputFile ($ fp );
480480 } elseif (file_exists ($ fp )) {
You can’t perform that action at this time.
0 commit comments