Skip to content

[4] fix Notice: Only variables should be passed by reference#32052

Merged
HLeithner merged 1 commit intojoomla:4.0-devfrom
PhilETaylor:arraypopreference
Jan 16, 2021
Merged

[4] fix Notice: Only variables should be passed by reference#32052
HLeithner merged 1 commit intojoomla:4.0-devfrom
PhilETaylor:arraypopreference

Conversation

@PhilETaylor
Copy link
Copy Markdown
Contributor

Code review

Test case: https://3v4l.org/OQacn

<?php
$command = ['one'=>1,"two"=>2,"three"=>3];
$keys = array_keys($command);

// Raises a notice
var_dump(array_pop(array_keys($command)));

echo "\n\n\n\n";

var_dump(array_pop($keys));

Signed-off-by: Phil E. Taylor <phil@phil-taylor.com>
@toivo
Copy link
Copy Markdown
Contributor

toivo commented Jan 16, 2021

I have tested this item ✅ successfully on 80ad3ae

Tested successfully in Beta7-dev of 16 January.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32052.

@ghost
Copy link
Copy Markdown

ghost commented Jan 16, 2021

I have tested this item ✅ successfully on 80ad3ae


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32052.

@alikon
Copy link
Copy Markdown
Contributor

alikon commented Jan 16, 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32052.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jan 16, 2021
@HLeithner HLeithner merged commit 79db077 into joomla:4.0-dev Jan 16, 2021
@HLeithner
Copy link
Copy Markdown
Member

thanks

@joomla-cms-bot joomla-cms-bot added PR-4.0-dev and removed RTC This Pull Request is Ready To Commit labels Jan 16, 2021
@HLeithner HLeithner added this to the Joomla 4.0 milestone Jan 16, 2021
dgrammatiko pushed a commit to dgrammatiko/joomla-cms that referenced this pull request Jan 17, 2021
Signed-off-by: Phil E. Taylor <phil@phil-taylor.com>
dgrammatiko pushed a commit to dgrammatiko/joomla-cms that referenced this pull request Jan 20, 2021
Signed-off-by: Phil E. Taylor <phil@phil-taylor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants