Skip to content

Commit 408a33e

Browse files
committed
[Dotenv] Make load() variadic
1 parent 407631c commit 408a33e

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-
public function load($path/*, ...$paths*/)
48+
public function load($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 ($paths as $path) {
5253
if (!is_readable($path) || is_dir($path)) {
5354
throw new PathException($path);
5455
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy