This repository was archived by the owner on Jan 8, 2020. It is now read-only.
Closes #6306 - Console\RouteNotFoundStrategy invalid index#6307
Merged
Conversation
Solves an issue where the consoles RouteNotFoundStrategy would throw an exception because an arrays index 0 isn't defined.
Contributor
There was a problem hiding this comment.
There is no need for the else, an if statement already does the trick:
if (isset($row[0])) {
$result .= $row[0] . "\n";
}
Member
|
Still needs a test case. |
Contributor
Author
|
Sorry for the delay, there isn't a test class for RouteNotFoundStrategy yet, should I create a complete new testclass? |
Contributor
Author
|
Tests have been added, not sure why php 5.3 fails? |
Contributor
There was a problem hiding this comment.
short array syntax is available since PHP 5.4
Contributor
Author
There was a problem hiding this comment.
Ah that's why tests fail, thanks, I'll fix that!
added 2 commits
June 16, 2014 02:18
Contributor
Author
|
Please merge this, it is so annoying :) |
Contributor
There was a problem hiding this comment.
Please use the ZF2 licence header:
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
Member
|
Assigning to @DASPRiD |
weierophinney
added a commit
that referenced
this pull request
Aug 7, 2014
Closes #6306 - Console\RouteNotFoundStrategy invalid index
weierophinney
added a commit
that referenced
this pull request
Aug 7, 2014
- Added an assertion to the test, and verified that it failed before the change. - Modified the foreach loop to continue if the test fails (do work outside of conditions/return early).
weierophinney
added a commit
that referenced
this pull request
Aug 7, 2014
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solves an issue where the consoles RouteNotFoundStrategy would throw an exception because an arrays index 0 isn't defined.