Changeset 806


Ignore:
Timestamp:
Jan 13, 2024 8:56:57 PM (4 months ago)
Author:
anonymous
Message:
 
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Upload.inc.php

    r724 r806  
    361361
    362362        if (!is_file($file_path_name)) {
    363             $app->logMsg(sprintf('Error deleting nonexistent file: %s', $file_path_name), LOG_ERR, __FILE__, __LINE__);
     363            $app->logMsg(sprintf('Error deleting; not a file: %s', $file_path_name), LOG_ERR, __FILE__, __LINE__);
    364364            return false;
    365365        } else if (unlink($file_path_name)) {
     
    393393        $old_file_path_name = $this->getParam('upload_path') . '/' . $old_name;
    394394        $new_file_path_name = $this->getParam('upload_path') . '/' . $new_name;
    395         if (file_exists($old_file_path_name)) {
     395        if (file_exists($old_file_path_name) && is_file($old_file_path_name)) {
    396396            if (rename($old_file_path_name, $new_file_path_name)) {
    397397                $this->_raiseMsg(sprintf(_("The file %s has been renamed to %s."), basename($old_file_path_name), basename($new_file_path_name)), MSG_NOTICE, __FILE__, __LINE__);
  • trunk/lib/Utilities.inc.php

    r804 r806  
    16841684    $current_url = absoluteMe();
    16851685    $referrer_url = getenv('HTTP_REFERER');
     1686
     1687    // If either is empty, don't continue with a comparison.
     1688    if ('' == $current_url || '' == $referrer_url) {
     1689        return false;
     1690    }
    16861691
    16871692    // If one of the hostnames is an IP address, compare only the path of both.
  • trunk/polyfill/mysql.inc.php

    r756 r806  
    833833        public function mysql_real_escape_string($string, $link = false)
    834834        {
     835            if ('' == $string) {
     836                return '';
     837            }
     838
    835839            $link = $this->_getLastLink($link);
    836840
Note: See TracChangeset for help on using the changeset viewer.