Ignore:
Timestamp:
Aug 27, 2015 2:35:55 AM (9 years ago)
Author:
anonymous
Message:

Detecting CLI also using php_sapi_name()

File:
1 edited

Legend:

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

    r545 r546  
    3737function dump($var, $display=false, $var_dump=false, $file='', $line='')
    3838{
    39     if (defined('_CLI')) {
     39    if (defined('_CLI') || 'cli' === php_sapi_name()) {
    4040        echo "DUMP FROM: $file $line\n";
    4141    } else {
     
    6060        }
    6161    }
    62     if (defined('_CLI')) {
     62    if (defined('_CLI') || 'cli' === php_sapi_name()) {
    6363        echo "\n";
    6464    } else {
Note: See TracChangeset for help on using the changeset viewer.