Changeset 547 for trunk/lib/DB.inc.php
- Timestamp:
- Aug 27, 2015 3:22:39 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/DB.inc.php
r546 r547 226 226 protected function _fail() 227 227 { 228 $app =& App::getInstance(); 229 228 230 if ($this->getParam('db_die_on_failure')) { 229 if (! defined('_CLI') && 'cli' !== php_sapi_name()) {231 if (!$app->cli) { 230 232 // For http requests, send a Service Unavailable header. 231 233 header(' ', true, 503); … … 323 325 $app->logMsg(sprintf('MySQL error %s: %s in query: %s', mysql_errno($this->dbh), mysql_error($this->dbh), $debugqry), LOG_EMERG, __FILE__, __LINE__); 324 326 if ($this->getParam('db_debug')) { 325 if (! defined('_CLI') && 'cli' !== php_sapi_name()) {327 if (!$app->cli) { 326 328 echo '<pre style="padding:2em; background:#ddd; font:9px monaco;">' . wordwrap(mysql_error($this->dbh)) . '<hr>' . htmlspecialchars($debugqry) . '</pre>'; 327 329 }
Note: See TracChangeset
for help on using the changeset viewer.