- Timestamp:
- Aug 8, 2019 10:36:08 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/DB.inc.php
r683 r697 32 32 class DB 33 33 { 34 35 34 // A place to keep an object instance for the singleton pattern. 36 35 protected static $instance = null; … … 186 185 // Print helpful or pretty error? 187 186 if ($this->getParam('db_debug')) { 188 echo $mysql_error_msg . "\n"; 187 if (!$app->isCLI()) { 188 printf('<pre style="padding:1em;background:#ddd;font:0.9rem monospace;">%s</pre>', $mysql_error_msg); 189 } 189 190 } 190 191 … … 346 347 $this->_query_count++; 347 348 348 $debugqry = preg_replace("/\n[\t ]+/ ", "\n", $query);349 $debugqry = preg_replace("/\n[\t ]+/u", "\n", $query); 349 350 if ($this->getParam('db_always_debug') || $debug) { 350 351 if ($debug > 1) { … … 371 372 if ($this->getParam('db_debug')) { 372 373 if (!$app->isCLI()) { 373 echo '<pre style="padding: 2em; background:#ddd; font:9px monaco;">' . wordwrap(mysql_error($this->dbh)) . '<hr>' . htmlspecialchars($debugqry) . '</pre>';374 echo '<pre style="padding:1em;background:#ddd;font:0.9rem monospace;">' . wordwrap(mysql_error($this->dbh)) . '<hr>' . htmlspecialchars($debugqry) . '</pre>'; 374 375 } 375 376 }
Note: See TracChangeset
for help on using the changeset viewer.