Make the "pr" function use printf instead of echo sprintf

This commit is contained in:
Adam Taylor 2013-09-10 19:52:18 -06:00
parent fd50c5277e
commit 186f2a27e0

View file

@ -245,7 +245,7 @@ if (!function_exists('pr')) {
function pr($var) {
if (Configure::read('debug') > 0) {
$template = php_sapi_name() !== 'cli' ? '<pre>%s</pre>' : "\n%s\n";
echo sprintf($template, print_r($var, true));
printf($template, print_r($var, true));
}
}