Merge pull request #1626 from ataylor32/pr-printf

Make the "pr" function use `printf` instead of `echo sprintf`
This commit is contained in:
Mark Story 2013-09-10 19:29:05 -07:00
commit a980fd92b9

View file

@ -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));
} }
} }