LSattr_ldap :: date : replace is_a check by instanceof to avoid warning on PHP 7

This commit is contained in:
Benjamin Renard 2019-08-06 11:49:45 +02:00
parent ee74f4d644
commit f3e332593e

View file

@ -43,7 +43,7 @@ class LSattr_ldap_date extends LSattr_ldap {
$retval=array(); $retval=array();
foreach($data as $val) { foreach($data as $val) {
$datetime = date_create_from_format($this -> getFormat(), $val); $datetime = date_create_from_format($this -> getFormat(), $val);
if (is_a($datetime, DateTime)) { if ($datetime instanceof DateTime) {
$retval[] = $datetime -> format('U'); $retval[] = $datetime -> format('U');
} }
} }