Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit408a33e

Browse files
committed
[Dotenv] Make load() variadic
1 parent407631c commit408a33e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/Symfony/Component/Dotenv/Dotenv.php‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ final class Dotenv
4545
* @throws FormatException when a file has a syntax error
4646
* @throws PathException when a file does not exist or is not readable
4747
*/
48-
publicfunctionload($path/*, ...$paths*/)
48+
publicfunctionload($path, ...$paths)
4949
{
50-
// func_get_args() to be replaced by a variadic argument for Symfony 4.0
51-
foreach (func_get_args()as$path) {
50+
array_unshift($paths,$path);
51+
52+
foreach ($pathsas$path) {
5253
if (!is_readable($path) ||is_dir($path)) {
5354
thrownewPathException($path);
5455
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp