{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/11952","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11952/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11952/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11952/events","html_url":"https://github.com/joomla/joomla-cms/pull/11952","id":175221762,"number":11952,"title":"JFile - error fix \"Error displaying the error page: Cannot pass parameter 2 by reference\"","user":{"login":"addondev","id":11632367,"avatar_url":"https://avatars.githubusercontent.com/u/11632367?v=3","gravatar_id":"","url":"https://api.github.com/users/addondev","html_url":"https://github.com/addondev","followers_url":"https://api.github.com/users/addondev/followers","following_url":"https://api.github.com/users/addondev/following{/other_user}","gists_url":"https://api.github.com/users/addondev/gists{/gist_id}","starred_url":"https://api.github.com/users/addondev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/addondev/subscriptions","organizations_url":"https://api.github.com/users/addondev/orgs","repos_url":"https://api.github.com/users/addondev/repos","events_url":"https://api.github.com/users/addondev/events{/privacy}","received_events_url":"https://api.github.com/users/addondev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-06T11:16:18Z","updated_at":"2016-09-15T21:17:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/11952","html_url":"https://github.com/joomla/joomla-cms/pull/11952","diff_url":"https://github.com/joomla/joomla-cms/pull/11952.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/11952.patch"},"body":"### Summary of Changes\r\nIf you pass a string to methods ````JFile::append```` or ````JFile::write````, you will have an error ````Cannot pass parameter 2 by reference````.\r\n\r\n### Testing Instructions\r\n\r\n`$string = 'Simple string';`\r\n`JFile::write('/var/www/site/text.txt', $string);`\r\n\r\nIt works, whereas the following causes the error:\r\n\r\n`JFile::write('/var/www/site/text.txt', 'Simple string');`\r\n\r\n````Cannot pass parameter 2 by reference````\r\n\r\nI 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."},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/247458105","html_url":"https://github.com/joomla/joomla-cms/pull/11952#issuecomment-247458105","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11952","id":247458105,"user":{"login":"addondev","id":11632367,"avatar_url":"https://avatars.githubusercontent.com/u/11632367?v=3","gravatar_id":"","url":"https://api.github.com/users/addondev","html_url":"https://github.com/addondev","followers_url":"https://api.github.com/users/addondev/followers","following_url":"https://api.github.com/users/addondev/following{/other_user}","gists_url":"https://api.github.com/users/addondev/gists{/gist_id}","starred_url":"https://api.github.com/users/addondev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/addondev/subscriptions","organizations_url":"https://api.github.com/users/addondev/orgs","repos_url":"https://api.github.com/users/addondev/repos","events_url":"https://api.github.com/users/addondev/events{/privacy}","received_events_url":"https://api.github.com/users/addondev/received_events","type":"User","site_admin":false},"created_at":"2016-09-15T21:17:24Z","updated_at":"2016-09-15T21:17:24Z","body":"Can you test it, please?"}}
{"actor":{"display_login":"addondev"}}