kleiner bug in "contenido/includes/functions.general.ph
Verfasst: So 4. Dez 2005, 14:19
in der "function recursive_copy($from_path, $to_path)" in line 440 der "contenido/includes/functions.general.php" wird die rekursion nach verzeichniswechsel am ende mit leere variable angesprungen, und erzeugt die fehlermeldungen (Warning: copy(/www/htdocs/v119307/kunden_cms/contenido/kunden/max/images): failed to open stream: Ist ein Verzeichnis in /www/htdocs/v119307/kunden_cms/contenido/contenido/includes/functions.general.php on line 462 )
wenn man den code dahingehend ändert (else - schleife) sind die meldungen weg:
while (($myfile = readdir($myhandle)) !== false)
{
if (($myfile != ".") && ($myfile != ".."))
{
if (is_dir($myfile))
{
recursive_copy($from_path.$myfile."/", $to_path.$myfile."/");
chdir($from_path);
}
else
{
if (file_exists($myfile))
{
copy($from_path.$myfile, $to_path.$myfile);
}
}
}
}
wenn man den code dahingehend ändert (else - schleife) sind die meldungen weg:
while (($myfile = readdir($myhandle)) !== false)
{
if (($myfile != ".") && ($myfile != ".."))
{
if (is_dir($myfile))
{
recursive_copy($from_path.$myfile."/", $to_path.$myfile."/");
chdir($from_path);
}
else
{
if (file_exists($myfile))
{
copy($from_path.$myfile, $to_path.$myfile);
}
}
}
}