Data missing Function:
public static function createFromFormat($format, $time, $tz = null)
{
if ($tz !== null) {
$date = parent::createFromFormat($format, $time, static::safeCreateDateTimeZone($tz));
} else {
$date = parent::createFromFormat($format, $time);
}
$lastErrors = parent::getLastErrors();
if ($date instanceof DateTime) {
$instance = static::instance($date);
$instance::setLastErrors($lastErrors);
return $instance;
}
throw new InvalidArgumentException(implode(PHP_EOL, $lastErrors['errors']));
}
What I tried was to change the date format from Y-n-j-G-i-s to 'Y-m-d H:i:s' but still the same error!
Unexpected data found. Unexpected data found. Data missing Thanks!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire