Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.3.0

Bug #4533 Error at file (file.php)
Submitted: 2005-06-06 05:34 UTC
From: kadefa_elmasry at hotmail dot com Assigned: yunosh
Status: Closed Package: VFS
PHP Version: 5.0.3 OS: WindowsXP
Roadmaps: (Not assigned)    
Subscription  


 [2005-06-06 05:34 UTC] kadefa_elmasry at hotmail dot com
Description: ------------ Just to get a flavour of the VFS, I tried the following code <?php include("VFS/VFS.php"); include("VFS/VFS/file.php"); $myfiles=new VFS_file(array('vfsroot'=>'.')); print_r( $myfiles->listFolders()); ?> This shows me an error at file: file.php line: 497 According to my understanding of the system, I think this line should be corrected to be: $folders[] = array('val' => $path . '/' . $files['name'], 'abbrev' => $files['name'], 'label' => $path . '/' . $files['name']);

Comments

 [2005-06-06 07:51 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-06-06 09:15 UTC] kadefa_elmasry at hotmail dot com
The original code is: foreach ($folderList as $files) { $folders[$folder['val']] = array('val' => $path . '/' . $files['name'], 'abbrev' => $files['name'], 'label' => $path . '/' . $files['name']); } The error is that the variable $folder is unidefined. If the idea is to just append the new folders to the list, My code would be correct.
 [2005-06-06 11:01 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-06-08 06:30 UTC] kadefa_Elmasry at hotmail dot com
The problem is there is no such a variable called $folder. So the code issues an error of undefined index $folder['val'] It could be a typo, I'm not understanding what should this $folder['val'] represent. If you want the folder list to be indexed by the file names, you may use $files['name']. Regards
 [2005-06-08 07:36 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!