Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-20288

$url cannot be null for Oracle in datalib.php add_to_log

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7.7, 1.8.10, 1.9.6, 2.0
    • Fix Version/s: 1.7.7+, 1.8.11, 1.9.7, 2.0
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Database:
      Oracle
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      Oracle treats the empty string as a NULL and so fails the NOT NULL requirement.

      $url defaults to the empty string and so hits this problem.
      $info also had this problem but was fixed in
      revision 1.348

      add_to_log just needs a similar fix for $url, i.e.

       if ($CFG->type = 'oci8po') { 
       	  	         if (empty($info)) {
       	  	             $info = ' ';
       	  	         }
      +	  	         if (empty($url)) {
      +	  	             $url = ' '; 
      +	  	         }
       }

        Gliffy Diagrams

          Activity

          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Resolving as fixed, now all versions from 1.7 to 2.0 are handling empty $info and $url properly.

          Thanks for the report and ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Resolving as fixed, now all versions from 1.7 to 2.0 are handling empty $info and $url properly. Thanks for the report and ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                31/Oct/09