-
Bug
-
Resolution: Fixed
-
Major
-
2.1.1, 2.2.1, 2.3
-
RHEL6
-
Oracle
-
MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
-
MOODLE_21_STABLE, MOODLE_22_STABLE
-
MDL-29199-master -
Easy
-
With the 'logall' option enabled in $CFG->dboptions, during the call to oci_native_moodle_database::connect() at page startup, a call to $this->temptables->is_temptable() is made inside oci_native_moodle_database::fix_table_names() before $this->temptables is initialised. Execution fails with this stack trace (edited for brevity):
Fatal error: Call to a member function is_temptable() on a non-object in /www/moodle2/lib/dml/oci_native_moodle_database.php on line 306
|
|
Call Stack:
|
1. {main}() /www/moodle2/index.php:0
|
2. require_once('/www/moodle2/config.php') /www/moodle2/index.php:31
|
3. require_once('/www/moodle2/lib/setup.php') /www/moodle2/config.php:56
|
4. setup_DB() /www/moodle2/lib/setup.php:442
|
5. oci_native_moodle_database->connect(..., ..., ..., ..., 'z_', array ('dbpersist' => 0, 'dbport' => 1521, 'logall' => TRUE)) /www/moodle2/lib/dmllib.php:279
|
6. oci_native_moodle_database->query_end(TRUE, resource(41) of type (oci8 statement)) /www/moodle2/lib/dml/oci_native_moodle_database.php:207
|
7. moodle_database->query_end(TRUE) /www/moodle2/lib/dml/oci_native_moodle_database.php:268
|
8. moodle_database->query_log(???) /www/moodle2/lib/dml/moodle_database.php:375
|
9. oci_native_moodle_database->insert_record('log_queries', ..., ???, ???) /www/moodle2/lib/dml/moodle_database.php:438
|
10. oci_native_moodle_database->get_columns('log_queries', ???) /www/moodle2/lib/dml/oci_native_moodle_database.php:1205
|
11. moodle_database->fix_sql_params(..., NULL) /www/moodle2/lib/dml/oci_native_moodle_database.php:473
|
12. oci_native_moodle_database->fix_table_names(...) /www/moodle2/lib/dml/moodle_database.php:675
|
A simple solution is to modify this line in oci_native_moodle_database::fix_table_names():
if ($this->temptables->is_temptable($name)) {
|
to be:
if ($this->temptables && $this->temptables->is_temptable($name)) {
|
- has been marked as being related by
-
MDL-57192 Database query logging fails with MySQLi (and possibly other drivers)
-
- Closed
-