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

From: Date: Sun, 04 Jul 2004 02:19:57 +0000
Subject: cvs: pear /PHP_Compat/Compat/Function scandir.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-21479@lists.php.net to get a copy of this message
aidan Sat Jul 3 22:19:57 2004 EDT Modified files: /pear/PHP_Compat/Compat/Function scandir.php Log: Fixed bug - scandir can accept bool http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/scandir.php?r1=1.13&r2=1.14&ty=u Index: pear/PHP_Compat/Compat/Function/scandir.php diff -u pear/PHP_Compat/Compat/Function/scandir.php:1.13 pear/PHP_Compat/Compat/Function/scandir.php:1.14 --- pear/PHP_Compat/Compat/Function/scandir.php:1.13 Sun Jun 13 10:07:55 2004 +++ pear/PHP_Compat/Compat/Function/scandir.php Sat Jul 3 22:19:57 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: scandir.php,v 1.13 2004/06/13 14:07:55 aidan Exp $ +// $Id: scandir.php,v 1.14 2004/07/04 02:19:57 aidan Exp $ // @@ -27,20 +27,20 @@ * @package PHP_Compat * @link http://php.net/function.scandir * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.13 $ + * @version $Revision: 1.14 $ * @since PHP 5 * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('scandir')) { - function scandir ($directory, $sorting_order = 0) + function scandir($directory, $sorting_order = 0) { if (!is_string($directory)) { trigger_error('scandir() expects parameter 1 to be string, ' . gettype($directory) . ' given', E_USER_WARNING); return null; } - if (!is_int($sorting_order)) { + if (!is_int($sorting_order) && !is_bool($sorting_order)) { trigger_error('scandir() expects parameter 2 to be long, ' . gettype($sorting_order) . ' given', E_USER_WARNING); return null; }

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