summaryrefslogtreecommitdiff
path: root/ext/standard/tests/file/fscanf_variation22.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/file/fscanf_variation22.phpt')
-rw-r--r--ext/standard/tests/file/fscanf_variation22.phpt16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/standard/tests/file/fscanf_variation22.phpt b/ext/standard/tests/file/fscanf_variation22.phpt
index f65578e32d..b5656ce907 100644
--- a/ext/standard/tests/file/fscanf_variation22.phpt
+++ b/ext/standard/tests/file/fscanf_variation22.phpt
@@ -60,7 +60,11 @@ foreach($char_formats as $char_format) {
rewind($file_handle);
echo "\n-- iteration $counter --\n";
while( !feof($file_handle) ) {
- var_dump( fscanf($file_handle,$char_format) );
+ try {
+ var_dump(fscanf($file_handle,$char_format));
+ } catch (ValueError $exception) {
+ echo $exception->getMessage() . "\n";
+ }
}
$counter++;
}
@@ -77,7 +81,7 @@ $file_path = __DIR__;
$filename = "$file_path/fscanf_variation22.tmp";
unlink($filename);
?>
---EXPECTF--
+--EXPECT--
*** Test fscanf(): different char format types with resource ***
-- iteration 1 --
@@ -147,12 +151,8 @@ array(1) {
bool(false)
-- iteration 7 --
-
-Warning: fscanf(): Bad scan conversion character " " in %s on line %d
-NULL
-
-Warning: fscanf(): Bad scan conversion character " " in %s on line %d
-NULL
+Bad scan conversion character " "
+Bad scan conversion character " "
bool(false)
-- iteration 8 --