Issue Details (XML | Word | Printable)

Key: MDL-20288
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Eloy Lafuente (stronk7)
Reporter: Emmel Aich
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

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

Created: 15/Sep/09 03:21 PM   Updated: 31/Oct/09 01:08 AM
Component/s: Database SQL/XMLDB
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

Database: Oracle
Participants: Eloy Lafuente (stronk7) and Emmel Aich
Security Level: None
Difficulty: Easy
Resolved date: 31/Oct/09
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  « Hide
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 = ' '; 
+	  	         }
 }


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Eloy Lafuente (stronk7) added a comment - 31/Oct/09 01:08 AM
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