Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Conversation

ioleo
Copy link

@ioleo ioleo commented Mar 22, 2016

Running symfony2 app/console cache:clear with zend-code version >= 3.0.0 gives this notice:

Notice: Undefined offset: 1 in {path}\vendor\zendframework\zend-code\src\Generator\MethodGenerator.php on line 98 PHP Notice: Undefined offset: 1 in {path}\vendor\zendframework\zend-code\src\Generator\MethodGenerator.php on line 98 

This PR fixes that adding a simple check.

loostro added 4 commits March 22, 2016 11:10
Running symfony2 `app/console cache:clear` with `zend-code` version `>= 3.0.0` gives this notice: ``` Notice: Undefined offset: 1 in {path}\vendor\zendframework\zend-code\src\Generator\MethodGenerator.php on line 98 PHP Notice: Undefined offset: 1 in {path}\vendor\zendframework\zend-code\src\Generator\MethodGenerator.php on line 98 ``` This PR fixes that adding a simple check.
@ioleo
Copy link
Author

ioleo commented Mar 22, 2016

@Ocramius ready to review

@mikeSimonson
Copy link
Contributor

Duplicate of #46 and #48. This solution at first look only avoid the error but does not do what the code expect to do.

@ioleo
Copy link
Author

ioleo commented Mar 28, 2016

@mikeSimonson could you elaborate - what does the code expect to do, so I could submit a proper fix?

@mikeSimonson
Copy link
Contributor

@loostro The original expect all the lines of the method to be returned in an array. It then try to properly indent thoses lines.

The change that you made just trim the whole body when the explode fail.

There are already 2 fixes for that issue #46 and #48. The maintainer just need to pick the one he find the most appropriate.

@ioleo
Copy link
Author

ioleo commented Mar 29, 2016

@mikeSimonson I see. I hope this gets fixed soon :)

@ioleo ioleo closed this Mar 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants