mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge pull request #1626 from ataylor32/pr-printf
Make the "pr" function use `printf` instead of `echo sprintf`
This commit is contained in:
commit
a980fd92b9
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