[OJS 3.2.1] Missing variable when setting reviewer notes

Hi,

We are working on OJS 3.2.1-0 from a tarball using PHP 7.2.

When an editor modifies notes on a reviewer, the following PHP Notice appears in the OJS error_log:

PHP Notice:  Undefined variable: user in /var/www/html/lib/pkp/controllers/grid/users/reviewer/form/ReviewerGossipForm.inc.php on line 70

The code on github pkp-lib master (lib/pkp/controllers/grid/users/reviewer/form/ReviewerGossipForm.inc.php \ReviewerGossipForm::execute):

	function execute(...$functionArgs) {
		$this->_user->setGossip($this->getData('gossip'));
		$userDao = DAORegistry::getDAO('UserDAO'); /* @var $userDao UserDAO */
		$userDao->updateObject($this->_user);
		parent::execute(...$functionArgs);
		return $user;
	}

$user is undefined.

Should this be returning $this->_user , $this, anything at all?

Thanks,

Hi @jp_ecancer,

The return value for ReviewerGossipForm::execute is neither documented nor used anywhere, so I’d recommend simply removing the return statement. Would you be able to file this as a pull request in Github? The file is here: https://github.com/pkp/pkp-lib/blob/stable-3_2_1/controllers/grid/users/reviewer/form/ReviewerGossipForm.inc.php

Thanks,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher ,

PR created: https://github.com/pkp/pkp-lib/pull/6117

We will start using PRs more (myself and my colleague @awecancer)

Thanks,

@jp_ecancer

Hi @jp_ecancer,

Thanks for contributing! We’re always happy to have PRs come our way. I’ll work through it with you over on Github.

Regards,
Alec Smecher
Public Knowledge Project Team