diff options
author | Daniel Lange <DLange@git.local> | 2017-02-20 18:12:46 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2017-02-20 18:12:46 +0100 |
commit | 335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70 (patch) | |
tree | 6dfb123b3ff27b46bcdf9ef9acf8fa41bffec946 /functions/admin_functions.php | |
parent | 7a4da3f67cb891cd5408bb4b511a54ccf9662485 (diff) | |
download | phpicalendar-335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70.tar.gz phpicalendar-335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70.tar.bz2 phpicalendar-335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70.zip |
PHP 7 compatibility from Sourceforge #680
Diffstat (limited to 'functions/admin_functions.php')
-rw-r--r-- | functions/admin_functions.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/functions/admin_functions.php b/functions/admin_functions.php index d62c077..d3ba2d5 100644 --- a/functions/admin_functions.php +++ b/functions/admin_functions.php @@ -119,7 +119,7 @@ function delete_cal ($filename) { $delete = unlink($filename); clearstatcache(); if (@file_exists($filename)) { - $filesys = eregi_replace("/","\\", $filename); + $filesys = preg_match("/\//","\\", $filename); $delete = system("rm -f $filesys"); clearstatcache(); if (@file_exists($filename)) { @@ -230,7 +230,7 @@ function is_uploaded_file_v4 ($filename) { $filename = str_replace ("\\", "/", $filename); $tmp_file = str_replace ("\\", "/", $tmp_file); // User might have trailing slash in php.ini... - return (ereg_replace('/+', '/', $tmp_file) == $filename); + return (preg_replace('/\/+/', '/', $tmp_file) == $filename); } // return the appropriate error message if the file upload had an error |