[-] IN : Remove warnings when safe_mode open_basedir missconfigured

This commit is contained in:
gRoussac
2013-09-08 17:25:59 +02:00
parent 2874f14983
commit 19a6c4373e
3 changed files with 8 additions and 8 deletions
@@ -51,7 +51,7 @@ function move_translations_module_file()
{
// Name for the old file and the new file
$old_file = _PS_MODULE_DIR_.$module_name.'/'.$lang['iso_code'].'.php';
if (!file_exists($old_file))
if (!@file_exists($old_file))
continue;
$dir_translations = _PS_MODULE_DIR_.$module_name.'/translations/';
@@ -61,7 +61,7 @@ function move_translations_module_file()
if (!is_dir($dir_translations))
$res &= mkdir($dir_translations, 0777);
if (!rename($old_file, $new_file))
if (!@rename($old_file, $new_file))
{
$error_list[] = $module_name.' - '.$lang['iso_code']."<br/>\r\n";
$res &= false;
@@ -30,8 +30,8 @@ function p15015_blockadvertising_extension()
define('_PS_ROOT_DIR_', realpath(INSTALL_PATH.'/../'));
// Try to update with the extension of the image that exists in the module directory
if (file_exists(_PS_ROOT_DIR_.'modules/blockadvertising'))
foreach (scandir(_PS_ROOT_DIR_.'modules/blockadvertising') as $file)
if (@file_exists(_PS_ROOT_DIR_.'modules/blockadvertising'))
foreach (@scandir(_PS_ROOT_DIR_.'modules/blockadvertising') as $file)
if (in_array($file, array('advertising.jpg', 'advertising.gif', 'advertising.png')))
Db::getInstance()->execute('
REPLACE INTO `'._DB_PREFIX_.'configuration` (name, value)
@@ -26,12 +26,12 @@
function update_genders_images()
{
if (file_exists(_PS_ROOT_DIR_.'/img/genders/Mr.jpg'))
if (@file_exists(_PS_ROOT_DIR_.'/img/genders/Mr.jpg'))
@rename(_PS_ROOT_DIR_.'/img/genders/Mr.jpg', _PS_ROOT_DIR_.'/img/genders/1.jpg');
if (file_exists(_PS_ROOT_DIR_.'/img/genders/Ms.jpg'))
if (@file_exists(_PS_ROOT_DIR_.'/img/genders/Ms.jpg'))
@rename(_PS_ROOT_DIR_.'/img/genders/Ms.jpg', _PS_ROOT_DIR_.'/img/genders/2.jpg');
if (file_exists(_PS_ROOT_DIR_.'/img/genders/Miss.jpg'))
if (@file_exists(_PS_ROOT_DIR_.'/img/genders/Miss.jpg'))
@rename(_PS_ROOT_DIR_.'/img/genders/Miss.jpg', _PS_ROOT_DIR_.'/img/genders/3.jpg');
if (file_exists(_PS_ROOT_DIR_.'genders/unknown.jpg'))
if (@file_exists(_PS_ROOT_DIR_.'genders/unknown.jpg'))
@rename(_PS_ROOT_DIR_.'/img/genders/unknown.jpg', _PS_ROOT_DIR_.'/img/genders/Unknown.jpg');
}