Las variables $year, $month y $day
están vacías o son nulas.
Si ejecuto esto:
Código PHP:
$fecha = new DateTime('//');
obtengo el mismo mensaje:
Cita: Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (//) at position 0 (/): Unexpected character' in [...][...]:9
Stack trace:
#0 [...][...](9): DateTime->__construct('//')
#1 {main}
thrown in ... on line 9