diff --git a/htdocs/comm/action/class/ical.class.php b/htdocs/comm/action/class/ical.class.php
index 54f97fa2117..8254a5de1ba 100644
--- a/htdocs/comm/action/class/ical.class.php
+++ b/htdocs/comm/action/class/ical.class.php
@@ -208,7 +208,7 @@ class ICal
//print 'type='.$type.' key='.$key.' value='.$value.'
'."\n";
- if ($key == false)
+ if (empty($key))
{
$key = $this->last_key;
switch ($type)
diff --git a/scripts/product/migrate_picture_path.php b/scripts/product/migrate_picture_path.php
index 9d3cba8452f..f8624ebc040 100755
--- a/scripts/product/migrate_picture_path.php
+++ b/scripts/product/migrate_picture_path.php
@@ -1,6 +1,6 @@
#!/usr/bin/env php
+/* Copyright (C) 2007-2016 Laurent Destailleur
* Copyright (C) 2015 Jean Heimburger
*
* This program is free software; you can redistribute it and/or modify
@@ -21,7 +21,6 @@
* \file scripts/product/migrate_picture_path.php
* \ingroup scripts
* \brief Migrate pictures from old system prior to 3.7 to new path for 3.7+
- *
*/
$sapi_type = php_sapi_name();
@@ -119,7 +118,7 @@ function migrate_product_photospath($product)
$handle=opendir($origin_osencoded);
if (is_resource($handle))
{
- while (($file = readdir($handle)) != false)
+ while (($file = readdir($handle)) !== false)
{
if ($file != '.' && $file != '..' && is_dir($origin_osencoded.'/'.$file))
{
@@ -127,7 +126,7 @@ function migrate_product_photospath($product)
if (is_resource($thumbs))
{
dol_mkdir($destin.'/'.$file);
- while (($thumb = readdir($thumbs)) != false)
+ while (($thumb = readdir($thumbs)) !== false)
{
dol_move($origin.'/'.$file.'/'.$thumb, $destin.'/'.$file.'/'.$thumb);
}