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


Ignore:
Timestamp:
Feb 10, 2019 9:48:46 PM (5 years ago)
Author:
anonymous
Message:

Add $app->isCLI() to replace $app->cli

File:
1 edited

Legend:

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

    r661 r665  
    261261
    262262        if ($this->getParam('db_die_on_failure')) {
    263             if (!$app->cli) {
     263            if (!$app->isCLI()) {
    264264                // For http requests, send a Service Unavailable header.
    265265                header(' ', true, 503);
     
    357357            $app->logMsg(sprintf('MySQL error %s: %s in query: %s', mysql_errno($this->dbh), mysql_error($this->dbh), $debugqry), LOG_EMERG, __FILE__, __LINE__);
    358358            if ($this->getParam('db_debug')) {
    359                 if (!$app->cli) {
     359                if (!$app->isCLI()) {
    360360                    echo '<pre style="padding:2em; background:#ddd; font:9px monaco;">' . wordwrap(mysql_error($this->dbh)) . '<hr>' . htmlspecialchars($debugqry) . '</pre>';
    361361                }
Note: See TracChangeset for help on using the changeset viewer.