cvs: pear /PHP_Compat/Compat/Function fprintf.php

From: Date: Wed, 06 May 2009 19:03:29 +0000
Subject: cvs: pear /PHP_Compat/Compat/Function fprintf.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-56052@lists.php.net to get a copy of this message
arpad Wed May 6 19:03:29 2009 UTC Modified files: /pear/PHP_Compat/Compat/Function fprintf.php Log: fix args from proxy function and remove 4.1.0 dependency via vsprintf http://cvs.php.net/viewvc.cgi/pear/PHP_Compat/Compat/Function/fprintf.php?r1=1.16&r2=1.17&diff_format=u Index: pear/PHP_Compat/Compat/Function/fprintf.php diff -u pear/PHP_Compat/Compat/Function/fprintf.php:1.16 pear/PHP_Compat/Compat/Function/fprintf.php:1.17 --- pear/PHP_Compat/Compat/Function/fprintf.php:1.16 Mon Nov 24 10:42:00 2008 +++ pear/PHP_Compat/Compat/Function/fprintf.php Wed May 6 19:03:29 2009 @@ -8,7 +8,7 @@ * @copyright 2004-2007 Aidan Lister <aidan@php.net>, Arpad Ray <arpad@php.net> * @link http://php.net/function.fprintf * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.16 $ + * @version $Revision: 1.17 $ * @since PHP 5 * @require PHP 4.0.0 (user_error) */ @@ -29,8 +29,9 @@ E_USER_WARNING); return false; } - - return fwrite($resource_handle, vsprintf($format, $args)); + + array_unshift($args, $format); + return fwrite($resource_handle, call_user_func_array('sprintf', $args)); } @@ -38,6 +39,7 @@ if (!function_exists('fprintf')) { function fprintf() { - return php_compat_fprintf(); + $args = func_get_args(); + return call_user_func_array('php_compat_fprintf', $args); } }

« previous php.pear.cvs (#56052) next »