summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwei <>2006-04-21 12:58:38 +0000
committerwei <>2006-04-21 12:58:38 +0000
commit3ad074e9410153fefaa2343165a68a355400fd6e (patch)
tree22b5e521f3af9d57bfd07b289201b86e29d1e48e
parente392ecbf6e422825083bc7204eacb7090619a47c (diff)
removed exceptions from simple date formatter
-rw-r--r--framework/Util/TSimpleDateFormatter.php12
-rw-r--r--tests/FunctionalTests/PradoTester.php2
-rw-r--r--tests/FunctionalTests/features/protected/controls/Layout.tpl1
3 files changed, 10 insertions, 5 deletions
diff --git a/framework/Util/TSimpleDateFormatter.php b/framework/Util/TSimpleDateFormatter.php
index 7be49bc9..052e0074 100644
--- a/framework/Util/TSimpleDateFormatter.php
+++ b/framework/Util/TSimpleDateFormatter.php
@@ -246,7 +246,8 @@ class TSimpleDateFormatter
if ($token=='y') { $x=2;$y=4; }
$year = $this->getInteger($value,$i_val,$x,$y);
if(is_null($year))
- throw new TInvalidDataValueException('Invalid year', $value);
+ return null;
+ //throw new TInvalidDataValueException('Invalid year', $value);
$i_val += strlen($year);
if(strlen($year) == 2)
{
@@ -264,7 +265,8 @@ class TSimpleDateFormatter
$this->length($token),2);
$iMonth = intval($month);
if(is_null($month) || $iMonth < 1 || $iMonth > 12 )
- throw new TInvalidDataValueException('Invalid month', $value);
+ return null;
+ //throw new TInvalidDataValueException('Invalid month', $value);
$i_val += strlen($month);
$month = $iMonth;
}
@@ -274,14 +276,16 @@ class TSimpleDateFormatter
$this->length($token), 2);
$iDay = intval($day);
if(is_null($day) || $iDay < 1 || $iDay >31)
- throw new TInvalidDataValueException('Invalid day', $value);
+ return null;
+ //throw new TInvalidDataValueException('Invalid day', $value);
$i_val += strlen($day);
$day = $iDay;
}
else
{
if($this->substring($value, $i_val, $this->length($token)) != $token)
- throw new TInvalidDataValueException("Subpattern '{$this->pattern}' mismatch", $value);
+ return null;
+ //throw new TInvalidDataValueException("Subpattern '{$this->pattern}' mismatch", $value);
else
$i_val += $this->length($token);
}
diff --git a/tests/FunctionalTests/PradoTester.php b/tests/FunctionalTests/PradoTester.php
index 8d081e0f..0c83217e 100644
--- a/tests/FunctionalTests/PradoTester.php
+++ b/tests/FunctionalTests/PradoTester.php
@@ -42,7 +42,7 @@ class PradoTester
else if($entry[0]!=='.')
$this->collectTestFiles($groupTest,$fullPath);
}
- closedir($folder);
+ @closedir($folder);
}
protected function isValidFile($entry)
diff --git a/tests/FunctionalTests/features/protected/controls/Layout.tpl b/tests/FunctionalTests/features/protected/controls/Layout.tpl
index 18482377..d1b33d94 100644
--- a/tests/FunctionalTests/features/protected/controls/Layout.tpl
+++ b/tests/FunctionalTests/features/protected/controls/Layout.tpl
@@ -22,6 +22,7 @@
<body>
<com:TForm>
<com:TContentPlaceHolder ID="Content" />
+<com:TJavascriptLogger />
</com:TForm>
</body>
</html> \ No newline at end of file