Skip to content

Commit

Permalink
Fixing weird issue where PHP casts a string with hyphens to 0. Closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdowling committed Apr 29, 2013
1 parent 25c532f commit 067520d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cron/AbstractField.php
Expand Up @@ -81,7 +81,7 @@ public function isInIncrementsOfRanges($dateValue, $value)
{
$parts = array_map('trim', explode('/', $value, 2));
$stepSize = isset($parts[1]) ? $parts[1] : 0;
if ($parts[0] == '*' || $parts[0] == 0) {
if ($parts[0] == '*' || $parts[0] === '0') {
return (int) $dateValue % $stepSize == 0;
}

Expand Down

0 comments on commit 067520d

Please sign in to comment.