Skip to content

Commit

Permalink
JFile - error fix "Cannot pass parameter 2 by reference" (#11952)
Browse files Browse the repository at this point in the history
* Fix of an error "Only variables should be passed by reference"

If you pass a string to methods ````append```` or ````write````, you will have an error ````Only variables should be passed by reference````

* Update file.php

* Update file.php
  • Loading branch information
philip-sorokin authored and rdeutz committed Sep 23, 2016
1 parent 95508ac commit d62647f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libraries/joomla/filesystem/file.php
Expand Up @@ -377,14 +377,14 @@ public static function read($filename, $incpath = false, $amount = 0, $chunksize
* Write contents to a file
*
* @param string $file The full file path
* @param string &$buffer The buffer to write
* @param string $buffer The buffer to write
* @param boolean $use_streams Use streams
*
* @return boolean True on success
*
* @since 11.1
*/
public static function write($file, &$buffer, $use_streams = false)
public static function write($file, $buffer, $use_streams = false)
{
@set_time_limit(ini_get('max_execution_time'));

Expand Down Expand Up @@ -443,14 +443,14 @@ public static function write($file, &$buffer, $use_streams = false)
* Append contents to a file
*
* @param string $file The full file path
* @param string &$buffer The buffer to write
* @param string $buffer The buffer to write
* @param boolean $use_streams Use streams
*
* @return boolean True on success
*
* @since 3.6.0
*/
public static function append($file, &$buffer, $use_streams = false)
public static function append($file, $buffer, $use_streams = false)
{
@set_time_limit(ini_get('max_execution_time'));

Expand Down

0 comments on commit d62647f

Please sign in to comment.