? Success

User tests: Successful: Unsuccessful:

avatar philip-sorokin
philip-sorokin
6 Sep 2016

Summary of Changes

If you pass a string to methods JFile::append or JFile::write, you will have an error Cannot pass parameter 2 by reference.

Testing Instructions

$string = 'Simple string';
JFile::write('/var/www/site/text.txt', $string);

It works, whereas the following causes the error:

JFile::write('/var/www/site/text.txt', 'Simple string');

Cannot pass parameter 2 by reference

I think, it is not compatible with php7, so I propose to change the code, because it is not necessary to pass the buffer by reference in these methods.

avatar addondev addondev - open - 6 Sep 2016
avatar addondev addondev - change - 6 Sep 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Sep 2016
Category Libraries
avatar joomla-cms-bot joomla-cms-bot - change - 6 Sep 2016
Labels Added: ?
avatar addondev addondev - edited - 6 Sep 2016
avatar addondev addondev - change - 6 Sep 2016
The description was changed
avatar addondev addondev - edited - 6 Sep 2016
avatar addondev addondev - change - 6 Sep 2016
Title
Fix of an error "Error displaying the error page: Cannot pass parameter 2 by reference"
JFile - error fix "Error displaying the error page: Cannot pass parameter 2 by reference"
avatar addondev addondev - edited - 6 Sep 2016
avatar addondev addondev - change - 6 Sep 2016
The description was changed
avatar addondev addondev - edited - 6 Sep 2016
avatar addondev addondev - change - 6 Sep 2016
The description was changed
avatar addondev addondev - edited - 6 Sep 2016
avatar andrepereiradasilva
andrepereiradasilva - comment - 6 Sep 2016

@addondev
See travis cs issues

FILE: ...ome/travis/build/joomla/joomla-cms/libraries/joomla/filesystem/file.php
--------------------------------------------------------------------------------
FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
 380 | ERROR | Doc comment for var &$buffer does not match actual variable name
     |       | $buffer at position 2
 446 | ERROR | Doc comment for var &$buffer does not match actual variable name
     |       | $buffer at position 2
--------------------------------------------------------------------------------
UPGRADE TO PHP_CODESNIFFER 2.0 TO FIX ERRORS AUTOMATICALLY
--------------------------------------------------------------------------------
avatar addondev
addondev - comment - 15 Sep 2016

Can you test it, please?

avatar addondev addondev - change - 20 Sep 2016
Title
JFile - error fix "Error displaying the error page: Cannot pass parameter 2 by reference"
JFile - error fix "Cannot pass parameter 2 by reference"
avatar addondev addondev - edited - 20 Sep 2016
avatar philip-sorokin
philip-sorokin - comment - 20 Sep 2016

Can you comment this, please?

avatar zero-24 zero-24 - test_item - 20 Sep 2016 - Tested successfully
avatar zero-24
zero-24 - comment - 20 Sep 2016

I have tested this item successfully on b4b4571

looks good to me. Thanks


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

avatar andrepereiradasilva andrepereiradasilva - test_item - 20 Sep 2016 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 20 Sep 2016

I have tested this item successfully on b4b4571

works as described

Needed to manually apply the patch because the patchtester cannot apply patch from unknown repository


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

avatar zero-24 zero-24 - change - 20 Sep 2016
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 20 Sep 2016

RTC. Thanks


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

avatar joomla-cms-bot joomla-cms-bot - change - 20 Sep 2016
Labels Added: ?
avatar philip-sorokin
philip-sorokin - comment - 20 Sep 2016

Needed to manually apply the patch because the patchtester cannot apply patch from unknown repository

Is there anything else that I should do?

avatar andrepereiradasilva
andrepereiradasilva - comment - 20 Sep 2016

i think you don't need to do anything more in this Pr. if a cms mantainer can merge this is all ok. if not they will tell you.

but for future do the PRs from a repositories or we can't use the patchtester to test.
I don't even know how can you make a PR from unknown repository ?

avatar mbabker
mbabker - comment - 20 Sep 2016

I don't even know how can you make a PR from unknown repository

The repository was deleted after the PR was created.

avatar andrepereiradasilva
andrepereiradasilva - comment - 20 Sep 2016

The repository was deleted after the PR was created.

ok so that's the problem here ?

avatar philip-sorokin
philip-sorokin - comment - 20 Sep 2016

I didn't know it can be a problem, sorry.

avatar rdeutz rdeutz - close - 23 Sep 2016
avatar rdeutz rdeutz - merge - 23 Sep 2016
avatar joomla-cms-bot joomla-cms-bot - close - 23 Sep 2016
avatar rdeutz rdeutz - change - 23 Sep 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-09-23 18:35:25
Closed_By rdeutz
avatar joomla-cms-bot joomla-cms-bot - change - 23 Sep 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment