Fix: Removed warning

This commit is contained in:
Laurent Destailleur 2011-04-19 22:25:06 +00:00
parent 65ee384aea
commit 50d39ca248

View File

@ -2431,7 +2431,7 @@ class Product extends CommonObject
* \brief Deplace fichier recupere sur internet (utilise pour interface avec OSC) * \brief Deplace fichier recupere sur internet (utilise pour interface avec OSC)
* \param sdir Repertoire destination finale * \param sdir Repertoire destination finale
* \param $files url de l'image * \param $files url de l'image
* \author Jean Heimburger juin 2007 * \author Jean Heimburger june 2007
*/ */
function add_photo_web($sdir, $file) function add_photo_web($sdir, $file)
{ {
@ -2451,13 +2451,14 @@ class Product extends CommonObject
// \todo A faire // \todo A faire
// Cree fichier en taille origine // Cree fichier en taille origine
$content = file_get_contents($file); $content = @file_get_contents(urlencode($file));
if( $content)
$nom = basename($file); {
$im = fopen(dol_osencode($dir.$nom),'wb'); $nom = basename($file);
fwrite($im, $content); $im = fopen(dol_osencode($dir.$nom),'wb');
fclose($im); fwrite($im, $content);
// } fclose($im);
}
} }
} }