dolibarr-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-dev] correction dolibarr 3.0


From: address@hidden
Subject: [Dolibarr-dev] correction dolibarr 3.0
Date: Mon, 18 Apr 2011 19:35:29 +0200
User-agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100328)

fichier product/class/product.class.php

dans méthode add_photo_web
remplacer
           $content = file_get_contents($file);

           $nom = basename($file);
           $im = fopen(dol_osencode($dir.$nom),'wb');
           fwrite($im, $content);
           fclose($im);
           //        }


par

           $content = @file_get_contents(urlencode($file));
           if( $content)
{ $nom = basename($file);
               $im = fopen(dol_osencode($dir.$nom),'wb');
               fwrite($im, $content);
               fclose($im);
           }

Cela évite l'afficahge de warning si l'url de l'image est fausse ou si l'image ne peut être téléchargée.

@+
Jean




reply via email to

[Prev in Thread] Current Thread [Next in Thread]