Changeset 793 for trunk


Ignore:
Timestamp:
Apr 10, 2023 10:48:12 PM (13 months ago)
Author:
anonymous
Message:

Backport dump() function from trunk

File:
1 edited

Legend:

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

    r789 r793  
    3939define('SC_DUMP_VAR_EXPORT', 2);
    4040define('SC_DUMP_JSON', 3);
    41 function dump($var, $display=false, $dump_method=SC_DUMP_PRINT_R, $file='', $line='')
     41function dump($var, $display=false, $dump_method=SC_DUMP_JSON, $file='', $line='')
    4242{
    4343    $app =& App::getInstance();
     
    7777
    7878    case SC_DUMP_JSON:
    79         echo json_encode($var, JSON_PRETTY_PRINT);
     79        echo json_encode($var, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK | JSON_PRETTY_PRINT);
    8080        break;
    8181    }
Note: See TracChangeset for help on using the changeset viewer.