Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actualize_script.php - Cannot pass parameter 2 by reference #1349

Closed
fpeterschmitt opened this issue Nov 2, 2016 · 3 comments
Closed

actualize_script.php - Cannot pass parameter 2 by reference #1349

fpeterschmitt opened this issue Nov 2, 2016 · 3 comments
Assignees
Milestone

Comments

@fpeterschmitt
Copy link

fpeterschmitt commented Nov 2, 2016

Hi,

I run FreshRSS 1.6.0.

I don't know if it's specific to PHP7, but i caught this error:

$ php /srv/freshrss/FreshRSS/app/actualize_script.php 
Starting feed actualization at 2016-11-02T13:56:35+01:00
Actualize florent...
PHP Fatal error:  Uncaught Error: Cannot pass parameter 2 by reference in /srv/freshrss/FreshRSS/app/Models/EntryDAO.php:201
Stack trace:
#0 /srv/freshrss/FreshRSS/app/Controllers/feedController.php(339): FreshRSS_EntryDAO->updateEntry(Array)
#1 /srv/freshrss/FreshRSS/app/Controllers/feedController.php(455): FreshRSS_feed_Controller::actualizeFeed(false, false, '1')
#2 /srv/freshrss/FreshRSS/lib/Minz/Dispatcher.php(119): FreshRSS_feed_Controller->actualizeAction()
#3 /srv/freshrss/FreshRSS/lib/Minz/Dispatcher.php(48): Minz_Dispatcher->launchAction('actualizeAction')
#4 /srv/freshrss/FreshRSS/lib/Minz/FrontController.php(84): Minz_Dispatcher->run()
#5 /srv/freshrss/FreshRSS/app/actualize_script.php(65): Minz_FrontController->run()
#6 {main}
  thrown in /srv/freshrss/FreshRSS/app/Models/EntryDAO.php on line 201

I modified EntryDAO.php line 201 so it works now:

$__patch_valuesTmp_isread = $valuesTmp['is_read'] ? 1 : 0;
$this->updateEntryPrepared->bindParam(':is_read', $__patch_valuesTmp_isread, PDO::PARAM_INT);
@fpeterschmitt fpeterschmitt changed the title [php7] actualize_script.php - Cannot pass parameter 2 by reference [php7 bug?] actualize_script.php - Cannot pass parameter 2 by reference Nov 2, 2016
@Alkarex
Copy link
Member

Alkarex commented Nov 2, 2016

Thanks for the bug report. Indeed, that looks like an error on our side. Could you please try with

        if ($valuesTmp['is_read'] !== null) {
            $this->updateEntryPrepared->bindValue(':is_read', $valuesTmp['is_read'] ? 1 : 0, PDO::PARAM_INT);
        }

@fpeterschmitt
Copy link
Author

Yes sir! It works, i got my feeds updated :)

@Alkarex Alkarex added this to the 1.6.0 milestone Nov 2, 2016
@Alkarex Alkarex changed the title [php7 bug?] actualize_script.php - Cannot pass parameter 2 by reference actualize_script.php - Cannot pass parameter 2 by reference Nov 2, 2016
Alkarex added a commit to Alkarex/FreshRSS that referenced this issue Nov 2, 2016
FreshRSS#1349
We should later replace all bindParam by bindValue
@Alkarex Alkarex self-assigned this Nov 2, 2016
@Alkarex
Copy link
Member

Alkarex commented Nov 2, 2016

Fixed in #1350
I will release a version 1.6.1 to address this regression.

@Alkarex Alkarex closed this as completed Nov 2, 2016
javerous pushed a commit to javerous/FreshRSS that referenced this issue Jan 20, 2020
FreshRSS#1349
We should later replace all bindParam by bindValue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants