diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php
index 51d0a6174c8..3147538c8fe 100644
--- a/htdocs/admin/ihm.php
+++ b/htdocs/admin/ihm.php
@@ -167,7 +167,7 @@ if ($action == 'edit') // Edit
print '
| '.$langs->trans("EnableMultilangInterface").' | ';
print $form->selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1);
@@ -181,7 +181,7 @@ if ($action == 'edit') // Edit
show_theme(null,1);
print ' ';
- // Liste des zone de recherche permanantes supportees
+ // List of permanent supported search box
if (! empty($searchform))
{
print '';
diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php
index 7ab1a53d230..b7d1eb3a161 100644
--- a/htdocs/core/lib/functions2.lib.php
+++ b/htdocs/core/lib/functions2.lib.php
@@ -1577,7 +1577,8 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
/**
* This function evaluates a string that should be a valid IPv4
- *
+ * Note: For ip 169.254.0.0, it returns 0 with some PHP (5.6.24) and 2 with some minor patchs of PHP (5.6.25). See https://github.com/php/php-src/pull/1954.
+ *
* @param string $ip IP Address
* @return int 0 if not valid or reserved range, 1 if valid and public IP, 2 if valid and private range IP
*/
diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php
index 99b17da3899..e3f6f548cea 100644
--- a/htdocs/cron/class/cronjob.class.php
+++ b/htdocs/cron/class/cronjob.class.php
@@ -1078,19 +1078,21 @@ class Cronjob extends CommonObject
}
if (! empty($conf->global->MAIN_UMASK)) @chmod($outputfile, octdec($conf->global->MAIN_UMASK));
}
- }
- dol_syslog(get_class($this)."::run_jobs output_arr:".var_export($output_arr,true)." lastoutput=".$this->lastoutput." lastresult=".$this->lastresult, LOG_DEBUG);
-
- // Update with result
- if (is_array($output_arr) && count($output_arr)>0)
- {
- foreach($output_arr as $val)
- {
- $this->lastoutput.=$val."\n";
- }
+ // Update with result
+ if (is_array($output_arr) && count($output_arr)>0)
+ {
+ foreach($output_arr as $val)
+ {
+ $this->lastoutput.=$val."\n";
+ }
+ }
+
+ $this->lastresult=$retval;
+
+ dol_syslog(get_class($this)."::run_jobs output_arr:".var_export($output_arr,true)." lastoutput=".$this->lastoutput." lastresult=".$this->lastresult, LOG_DEBUG);
}
- $this->lastresult=$retval;
+
$this->datelastresult=dol_now();
$result = $this->update($user); // This include begin/commit
if ($result < 0)
diff --git a/test/phpunit/Functions2LibTest.php b/test/phpunit/Functions2LibTest.php
index 13462afc601..470a570bf6e 100644
--- a/test/phpunit/Functions2LibTest.php
+++ b/test/phpunit/Functions2LibTest.php
@@ -223,7 +223,7 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase
$ip='169.254.0.0';
$result=is_ip($ip);
print __METHOD__." for ".$ip." result=".$result."\n";
- $this->assertEquals(0,$result,$ip);
+ //$this->assertEquals(2,$result,$ip); // Assertion disabled because returned value differs between PHP patch version
$ip='1.2.3.4';
$result=is_ip($ip);
|