Fix bug reported by scrutinizer
This commit is contained in:
parent
8bcd2e581f
commit
1e9cee1b07
@ -208,7 +208,7 @@ class ICal
|
|||||||
|
|
||||||
//print 'type='.$type.' key='.$key.' value='.$value.'<br>'."\n";
|
//print 'type='.$type.' key='.$key.' value='.$value.'<br>'."\n";
|
||||||
|
|
||||||
if ($key == false)
|
if (empty($key))
|
||||||
{
|
{
|
||||||
$key = $this->last_key;
|
$key = $this->last_key;
|
||||||
switch ($type)
|
switch ($type)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2007-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2007-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2015 Jean Heimburger <http://tiaris.eu>
|
* Copyright (C) 2015 Jean Heimburger <http://tiaris.eu>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -21,7 +21,6 @@
|
|||||||
* \file scripts/product/migrate_picture_path.php
|
* \file scripts/product/migrate_picture_path.php
|
||||||
* \ingroup scripts
|
* \ingroup scripts
|
||||||
* \brief Migrate pictures from old system prior to 3.7 to new path for 3.7+
|
* \brief Migrate pictures from old system prior to 3.7 to new path for 3.7+
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$sapi_type = php_sapi_name();
|
$sapi_type = php_sapi_name();
|
||||||
@ -119,7 +118,7 @@ function migrate_product_photospath($product)
|
|||||||
$handle=opendir($origin_osencoded);
|
$handle=opendir($origin_osencoded);
|
||||||
if (is_resource($handle))
|
if (is_resource($handle))
|
||||||
{
|
{
|
||||||
while (($file = readdir($handle)) != false)
|
while (($file = readdir($handle)) !== false)
|
||||||
{
|
{
|
||||||
if ($file != '.' && $file != '..' && is_dir($origin_osencoded.'/'.$file))
|
if ($file != '.' && $file != '..' && is_dir($origin_osencoded.'/'.$file))
|
||||||
{
|
{
|
||||||
@ -127,7 +126,7 @@ function migrate_product_photospath($product)
|
|||||||
if (is_resource($thumbs))
|
if (is_resource($thumbs))
|
||||||
{
|
{
|
||||||
dol_mkdir($destin.'/'.$file);
|
dol_mkdir($destin.'/'.$file);
|
||||||
while (($thumb = readdir($thumbs)) != false)
|
while (($thumb = readdir($thumbs)) !== false)
|
||||||
{
|
{
|
||||||
dol_move($origin.'/'.$file.'/'.$thumb, $destin.'/'.$file.'/'.$thumb);
|
dol_move($origin.'/'.$file.'/'.$thumb, $destin.'/'.$file.'/'.$thumb);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user