Browse Source

- CS and "de-facto" style of returning NULL for failing parse-params, sync partially with PHP_5_3 too (reordering part :)

experimental/with_scalar_types
Jani Taskinen 15 years ago
parent
commit
72ae65bc9d
  1. 319
      main/output.c
  2. 12
      tests/output/ob_start_basic_006.phpt
  3. 6
      tests/output/ob_start_error_001.phpt

319
main/output.c
File diff suppressed because it is too large
View File

12
tests/output/ob_start_basic_006.phpt

@ -74,30 +74,40 @@ checkAndClean();
--EXPECTF--
---> Test arrays:
Warning: ob_start(): array must have exactly two members in %s on line 44
Notice: ob_start(): failed to create buffer in %s on line 44
bool(false)
Array
(
)
Warning: ob_start(): class 'f' not found in %s on line 47
Notice: ob_start(): failed to create buffer in %s on line 47
bool(false)
Array
(
)
Warning: ob_start(): array must have exactly two members in %s on line 50
Notice: ob_start(): failed to create buffer in %s on line 50
bool(false)
Array
(
)
Warning: ob_start(): array must have exactly two members in %s on line 53
Notice: ob_start(): failed to create buffer in %s on line 53
bool(false)
Array
(
)
Warning: ob_start(): array must have exactly two members in %s on line 56
Notice: ob_start(): failed to create buffer in %s on line 56
bool(false)
Array
@ -116,6 +126,8 @@ Array
)
Warning: ob_start(): array must have exactly two members in %s on line 68
Notice: ob_start(): failed to create buffer in %s on line 68
bool(false)
Array

6
tests/output/ob_start_error_001.phpt

@ -33,7 +33,7 @@ var_dump(ob_start("justPrint", 0, "this should be a bool"));
- Too many arguments
Warning: ob_start() expects at most 3 parameters, 4 given in %s on line 17
bool(false)
NULL
- Arg 1 wrong type
@ -45,9 +45,9 @@ bool(false)
- Arg 2 wrong type
Warning: ob_start() expects parameter 2 to be long, string given in %s on line 23
bool(false)
NULL
- Arg 3 wrong type
Warning: ob_start() expects parameter 3 to be long, string given in %s on line 26
bool(false)
NULL
Loading…
Cancel
Save