Skip to content

Commit

Permalink
Simlify condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Scherer committed Apr 24, 2015
1 parent 18c801d commit 41935cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database/Type/DateTimeType.php
Expand Up @@ -103,7 +103,7 @@ public function toDatabase($value, Driver $driver)
*/
public function toPHP($value, Driver $driver)
{
if ($value === null || strpos($value, '-') !== false && (int)$value === 0) {
if ($value === null || strpos($value, '0000-00-00') === 0) {
return null;
}

Expand Down

0 comments on commit 41935cf

Please sign in to comment.