mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Make the "pr" function use printf
instead of echo sprintf
This commit is contained in:
parent
fd50c5277e
commit
186f2a27e0
1 changed files with 1 additions and 1 deletions
|
@ -245,7 +245,7 @@ if (!function_exists('pr')) {
|
||||||
function pr($var) {
|
function pr($var) {
|
||||||
if (Configure::read('debug') > 0) {
|
if (Configure::read('debug') > 0) {
|
||||||
$template = php_sapi_name() !== 'cli' ? '<pre>%s</pre>' : "\n%s\n";
|
$template = php_sapi_name() !== 'cli' ? '<pre>%s</pre>' : "\n%s\n";
|
||||||
echo sprintf($template, print_r($var, true));
|
printf($template, print_r($var, true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue