[pLog-svn] r542 - plog/trunk/class/misc
subaochen at devel.plogworld.net
subaochen at devel.plogworld.net
Sun Dec 19 14:27:11 GMT 2004
Author: subaochen
Date: 2004-12-19 14:27:10 +0000 (Sun, 19 Dec 2004)
New Revision: 542
Modified:
plog/trunk/class/misc/glob.class.php
Log:
don't show ugly error message to end user, so check if the folder readable first
Modified: plog/trunk/class/misc/glob.class.php
===================================================================
--- plog/trunk/class/misc/glob.class.php 2004-12-19 14:17:16 UTC (rev 541)
+++ plog/trunk/class/misc/glob.class.php 2004-12-19 14:27:10 UTC (rev 542)
@@ -89,7 +89,11 @@
function myGlob( $folder = ".", $pattern = "*" )
{
// Note that !== did not exist until 4.0.0-RC2
- if ($handle = opendir( $folder )) {
+ // what if the temp folder is deleted? or $folder is not exist? then will raise
+ // ugly error or warning message. so first check if $folder readable
+ if( !file_exists( $folder )) return Array();
+
+ if ( $handle = opendir( $folder )) {
$files = Array();
while (false !== ($file = readdir($handle))) {
More information about the pLog-svn
mailing list