Changeset 724 for trunk/lib/DB.inc.php


Ignore:
Timestamp:
May 4, 2020 2:25:31 AM (4 years ago)
Author:
anonymous
Message:

Use the /u regex modifier only when using UTF-8. Disable indexed array key removal from URL query args.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/DB.inc.php

    r721 r724  
    180180        if (!$this->dbh || mysql_error($this->dbh)) {
    181181            $mysql_error_msg = $this->dbh ? 'Codebase MySQL connect error: (' . mysql_errno($this->dbh) . ') ' . mysql_error($this->dbh) : sprintf('Codebase MySQL connect error: Could not connect to server (db_server=%s, db_name=%s, db_user=%s, db_pass=%s)', $this->getParam('db_server'), $this->getParam('db_name'), $this->getParam('db_user'), ('' == $this->getParam('db_pass') ? 'NO' : 'YES'));
    182             $app->logMsg($mysql_error_msg, LOG_EMERG, __FILE__, __LINE__);
     182            $app->logMsg($mysql_error_msg, LOG_ERR, __FILE__, __LINE__);
    183183
    184184            // Print helpful or pretty error?
     
    346346        $this->_query_count++;
    347347
    348         $debugqry = preg_replace("/\n[\t ]+/u", "\n", $query);
     348        $debugqry = preg_replace('/\n[\t ]+/' . $app->getParam('preg_u'), "\n", $query);
    349349        if ($this->getParam('db_always_debug') || $debug) {
    350350            if ($debug > 1) {
Note: See TracChangeset for help on using the changeset viewer.