Salve, ho unu problemino con la funzione find($paths, $file) di joomla.
Prticamente la funzione find (joomla.filesystem.path) e fatta in questa manera:
praticamente dovrebbe far tornare il fullpath di un file se lo trova altrimenti false.codice:public static function find($paths, $file) { settype($paths, 'array'); //force to array // start looping through the path set foreach ($paths as $path) { // get the path to the file $fullname = $path.'/'.$file; // is the path based on a stream? if (strpos($path, '://') === false) { // not a stream, so do a realpath() to avoid directory // traversal attempts on the local file system. $path = realpath($path); // needed for substr() later $fullname = realpath($fullname); } // the substr() check added to make sure that the realpath() // results in a directory registered so that // non-registered directores are not accessible via directory // traversal attempts. if (file_exists($fullname) && substr($fullname, 0, strlen($path)) == $path) { echo ('1 : '.$fullname.' '); return $fullname; } } return false; }
il problema sta nel fatto che la funzione trova il file ma continua il ciclo senza tenere conto dell istruzione return.
Qualcuno ha riscontrato lo stesso problema?
Grazie


Rispondi quotando