Skip to content

Commit 99da217

Browse files
committed
Php Inspections (EA Extended): fixing UTs
1 parent 8cc5364 commit 99da217

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/validator/sfValidatorDate.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ protected function convertDateArrayToString($value)
174174
// all elements must be empty or a number
175175
foreach (array('year', 'month', 'day', 'hour', 'minute', 'second') as $key)
176176
{
177-
if (isset($value[$key]) && !ctype_digit($value[$key]) && !empty($value[$key]))
177+
if (isset($value[$key]) && !ctype_digit((string)$value[$key]) && !empty($value[$key]))
178178
{
179179
throw new sfValidatorError($this, 'invalid', array('value' => $value));
180180
}

lib/validator/sfValidatorTime.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ protected function convertTimeArrayToTimestamp($value)
9494
// all elements must be empty or a number
9595
foreach (array('hour', 'minute', 'second') as $key)
9696
{
97-
if (isset($value[$key]) && !ctype_digit($value[$key]) && !empty($value[$key]))
97+
if (isset($value[$key]) && !ctype_digit((string)$value[$key]) && !empty($value[$key]))
9898
{
9999
throw new sfValidatorError($this, 'invalid', array('value' => $value));
100100
}

0 commit comments

Comments
 (0)