Skip to content

Simplification #5082

Merged
merged 1 commit into from Sep 6, 2013

3 participants

@VitoNordloh

No description provided.

@samsonasik

empty is different with null.

$a = '' is empty, but not NULL.
@VitoNordloh

That's right! But not in this context. $params is always an array or null.

An alternative would be

$this->params = is_null($params) ? array() : $params;

or

$this->params = null === $params ? array() : $params;

But empty is a more common way than is_null in ZF. And ... $this->params = null === $params ... is difficult to read.

@weierophinney weierophinney added a commit that referenced this pull request Sep 6, 2013
@weierophinney weierophinney Merge branch 'feature/5082' into develop
Close #5082
0b0ad6d
@weierophinney weierophinney was assigned Sep 6, 2013
@weierophinney weierophinney merged commit b157742 into zendframework:develop Sep 6, 2013

1 check failed

Details default The Travis CI build failed
@weierophinney weierophinney added a commit to zendframework/zend-navigation that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge pull request zendframework/zf2#5082 from VitoNordloh/patch-1
Simplification
8063701
@weierophinney weierophinney added a commit to zendframework/zend-navigation that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'feature/5082' into develop e237951
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.