-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Conversation
by mistake hadn't set my global name and email address for git hence the commit coming from someone named root. |
@jeremyquinton test required |
I will commit one this evening. |
@Ocramius unit test as requested. |
Btw: |
@jeremyquinton Please fix the cs and this will be merged. |
@Maks3w when you say cs do you mean code style and are you referring to the comment above yours. |
@jeremyquinton yes, code style. See travis report for to see where your code is failing. |
@Maks3w I'm not 100% sure what trailing spaces it means but any guidance appreciated. PSR-2 https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md states I don't have any trailing whitespace that I can see |
will give this https://github.com/fabpot/PHP-CS-Fixer a try leave it to me |
@@ -282,7 +282,7 @@ protected function _filterTag($tag) | |||
foreach ($matches[1] as $index => $attributeName) { | |||
$attributeName = strtolower($attributeName); | |||
$attributeDelimiter = empty($matches[2][$index]) ? $matches[4][$index] : $matches[2][$index]; | |||
$attributeValue = empty($matches[3][$index]) ? $matches[5][$index] : $matches[3][$index]; | |||
$attributeValue = (strlen($matches[3][$index]) == 0) ? $matches[5][$index] : $matches[3][$index]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't there be a strict comparison, since strlen() may return null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from http://uk3.php.net/strlen strlen returns null if called on an array. Is there another circumstance when strlen can return null?
I wrote this fix a couple months ago but unless $matches[3][$index] is an array at any point I think this should be ok.
I can't find the code I used to reproduce the issue. In the next week what I will do is rewrite the code to reproduce the issue and see what the value of $matches[3][$index] is to get a feel for if it can every be an array.
No description provided.