1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 08:42:29 +01:00
Commit Graph

7 Commits

Author SHA1 Message Date
dwgebler
f5139878f9 Check parameters on compact() and throw warning if not string or array of strings (#6921)
compact() is documented (https://www.php.net/manual/en/function.compact) as a variadic function accepting parameters which are strings or arrays of strings referencing defined symbols.

In actuality, passing nonsense parameters e.g. compact(true, 42) merely returns an empty array. I propose throwing a warning in these cases, to prevent silent bugs.
2021-05-11 09:36:12 +02:00
Máté Kocsis
c37a1cd650 Promote a few remaining errors in ext/standard
Closes GH-6110
2020-09-15 14:26:16 +02:00
Máté Kocsis
b5c7a83dca Remove unnecessary PHPDoc-alike blocks from tests
Closes GH-5759
2020-06-24 13:13:44 +02:00
Máté Kocsis
36935e42ea Improve undefined variable error messages
Closes GH-5312
2020-03-31 13:02:32 +02:00
Gabriel Caruso
fc775f6915 Report unknown variables passed to compact() 2018-06-19 12:50:15 +02:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Robert Nicholson
c09d8d931f - New tests for compact() 2008-01-24 14:51:20 +00:00