Changeset 709


Ignore:
Timestamp:
Nov 16, 2019 9:14:04 PM (4 years ago)
Author:
anonymous
Message:

Fix PHP notice errors

Location:
branches/1.1dev
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1dev/lib/App.inc.php

    r689 r709  
    297297        // Use non specific boomerang if available.
    298298        $url = end($_SESSION['_boomerang']['url']);
     299    } else {
     300        // If URL is not specified, use the $CFG->redirect_home config value.
     301        $url = $CFG->redirect_home;
    299302    }
    300303
  • branches/1.1dev/lib/Upload.inc.php

    r648 r709  
    576576    {
    577577        preg_match('/.*?\.(\w+)$/i', $file_name, $ext);
    578         return $ext[1];
     578        if (isset($ext[1])) {
     579            return $ext[1];
     580        } else {
     581            logMsg(sprintf('No filename extension found: %s.', $file_name), LOG_NOTICE, __FILE__, __LINE__);
     582            return '';
     583        }
    579584    }
    580585}
    581 
    582 ?>
  • branches/1.1dev/templates/form_error_header.ihtml

    r1 r709  
    11<?php
    22// This prints the messages saved in the error messages stack used in FormValidator.inc.php
    3 if (method_exists($fv, 'getErrorList')) {
     3if (isset($fv) && method_exists($fv, 'getErrorList')) {
    44    if ($fv->anyErrors()) {
    55        ?><div class="codebasemsg"><?php
     
    1414                    echo '<div class="error">' . $_err['message'] . '</div>';
    1515                    break;
    16        
     16
    1717                case MSG_WARNING:
    1818                    echo '<div class="warning">' . $_err['message'] . '</div>';
    1919                    break;
    20        
     20
    2121                case MSG_SUCCESS:
    2222                    echo '<div class="success">' . $_err['message'] . '</div>';
    2323                    break;
    24        
     24
    2525                case MSG_NOTICE:
    2626                default:
Note: See TracChangeset for help on using the changeset viewer.