This repository was archived by the owner on Jan 31, 2020. It is now read-only.
set default extras as empty array to prevent compact() errors#170
Closed
kilip wants to merge 3 commits intozendframework:developfrom
kilip:headlink-helper-compact
Closed
set default extras as empty array to prevent compact() errors#170kilip wants to merge 3 commits intozendframework:developfrom kilip:headlink-helper-compact
kilip wants to merge 3 commits intozendframework:developfrom
kilip:headlink-helper-compact
Conversation
froschdesign
suggested changes
Nov 12, 2018
Member
|
Reference for this change in PHP 7.3: http://php.net/manual/en/function.compact.php#refsect1-function.compact-changelog |
Member
|
Duplicate of #167 |
Closed
froschdesign
approved these changes
Nov 12, 2018
weierophinney
added a commit
that referenced
this pull request
Dec 6, 2018
weierophinney
added a commit
that referenced
this pull request
Dec 6, 2018
Member
|
Thanks, @kilip - cherry-picked to master, to release with 2.10.1. |
This was referenced May 31, 2021
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.
Hello,
PHP
compact()function at line 413 will create php error when$argsis an empty array:zend-view/src/Helper/HeadLink.php
Lines 379 to 416 in 34babb4
I have found this error in this travis build:
https://travis-ci.org/cross-solution/YAWIK/jobs/453775095#L1805
To reproducing error just simply execute this function
HeadLink::prependStylesheet('/some/foo.css')I think this
compact()error only occurs in php 7.3, but the code is buggy too. We need to define default value for$extrasvariables.