Ignore:
Timestamp:
May 2, 2016, 12:09:23 PM (3 years ago)
Author:
jrpelegrina
Message:

Updated to moodle 3.0.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • moodle/trunk/fuentes/lib/dml/moodle_database.php

    r136 r1331  
    578578        // We accept nulls in conditions
    579579        $conditions = is_null($conditions) ? array() : $conditions;
     580
     581        if (empty($conditions)) {
     582            return array('', array());
     583        }
     584
    580585        // Some checks performed under debugging only
    581586        if (debugging()) {
     
    601606
    602607        $allowed_types = $this->allowed_param_types();
    603         if (empty($conditions)) {
    604             return array('', array());
    605         }
    606608        $where = array();
    607609        $params = array();
     
    10841086    /**
    10851087     * Enable/disable detailed sql logging
     1088     *
     1089     * @deprecated since Moodle 2.9
     1090     * @todo MDL-49824 This will be deleted in Moodle 3.1.
    10861091     * @param bool $state
    10871092     */
    10881093    public function set_logging($state) {
    1089         // adodb sql logging shares one table without prefix per db - this is no longer acceptable :-(
    1090         // we must create one table shared by all drivers
     1094        debugging('set_logging() is deprecated and will not be replaced.', DEBUG_DEVELOPER);
    10911095    }
    10921096
     
    24302434     *
    24312435     * @param moodle_transaction $transaction An instance of a moodle_transaction.
    2432      * @param Exception $e The related exception to this transaction rollback.
     2436     * @param Exception|Throwable $e The related exception/throwable to this transaction rollback.
    24332437     * @return void This does not return, instead the exception passed in will be rethrown.
    24342438     */
    2435     public function rollback_delegated_transaction(moodle_transaction $transaction, Exception $e) {
     2439    public function rollback_delegated_transaction(moodle_transaction $transaction, $e) {
     2440        if (!($e instanceof Exception) && !($e instanceof Throwable)) {
     2441            // PHP7 - we catch Throwables in phpunit but can't use that as the type hint in PHP5.
     2442            $e = new \coding_exception("Must be given an Exception or Throwable object!");
     2443        }
    24362444        if ($transaction->is_disposed()) {
    24372445            throw new dml_transaction_exception('Transactions already disposed', $transaction);
Note: See TracChangeset for help on using the changeset viewer.