[pLog-svn] r895 - plog/trunk/class/file/finder
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Mon Jan 31 13:02:39 GMT 2005
Author: oscar
Date: 2005-01-31 13:02:39 +0000 (Mon, 31 Jan 2005)
New Revision: 895
Modified:
plog/trunk/class/file/finder/filefinder.class.php
Log:
if there is no current list of items already avialble, use an empty array so that we can avoid throwing ugly error messages
Modified: plog/trunk/class/file/finder/filefinder.class.php
===================================================================
--- plog/trunk/class/file/finder/filefinder.class.php 2005-01-31 13:01:50 UTC (rev 894)
+++ plog/trunk/class/file/finder/filefinder.class.php 2005-01-31 13:02:39 UTC (rev 895)
@@ -55,6 +55,11 @@
function find( $currentList, $fileName = '*' )
{
$files = Glob::myGlob( $this->_folder, $fileName );
+
+ // create an empty array if we got something else other than an array so that
+ // we can avoid some ugly error messages!
+ if( !is_array($currentList))
+ $currentList = Array();
// loop through the files...
foreach( $files as $file ) {
More information about the pLog-svn
mailing list