Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not prescribe numeric array indices in setParameters #91

Closed
wants to merge 1 commit into from
Closed

Do not prescribe numeric array indices in setParameters #91

wants to merge 1 commit into from

Conversation

spawnia
Copy link

@spawnia spawnia commented Sep 30, 2021

The following code broke:

        $parameters = $execute->getParameters();
        $parameters[] = $parameter;

        $execute->setParameters($parameters);
Error: Cannot unpack array with string keys

/home/benedikt/projects/sailor/vendor/nette/php-generator/src/PhpGenerator/Traits/FunctionLike.php:72
  • bug fix
  • BC break? no
  • doc PR: just a fix for breakage

The following code broke:

```php
        $parameters = $execute->getParameters();
        $parameters[] = $parameter;

        $execute->setParameters($parameters);
```

```
Error: Cannot unpack array with string keys

/home/benedikt/projects/sailor/vendor/nette/php-generator/src/PhpGenerator/Traits/FunctionLike.php:72
```
spawnia added a commit to spawnia/sailor that referenced this pull request Sep 30, 2021
@dg dg closed this in 15a3490 Oct 1, 2021
@spawnia spawnia deleted the patch-1 branch October 1, 2021 08:56
@spawnia
Copy link
Author

spawnia commented Oct 1, 2021

Thanks, looking forward to a release that has the bugfix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant