Bug 8089 - PHP fatal error when viewing Notifications
PHP fatal error when viewing Notifications
Status: RESOLVED FIXED
Product: OCS
Classification: Unclassified
Component: User Interface
2.3.6
All All
: P3 normal
Assigned To: PKP Support
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-21 22:22 PST by James MacGregor
Modified: 2013-01-21 22:38 PST (History)
0 users

See Also:
Version Reported In:
Also Affects:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James MacGregor 2013-01-21 22:22:06 PST
If I click the "View" link in the Notifications sidebar, I get the following fatal error: 

 Fatal error: Call to undefined method NotificationDAO::getNotificationsByUserId() in /Users/jmacgreg/git/ocs/lib/pkp/pages/notification/NotificationHandler.inc.php on line 40

The proper method is actually getByUserId(). Changing the method to that in NotificationHandler.inc.php (and in the second instance, in the notificationFeed() function) solves the immediate problem. This is tangentially related to the commits for Bug 7363; I don't think any other branches are affected, but I'll double-check.
Comment 1 James MacGregor 2013-01-21 22:25:01 PST
Fixed incorrect notification function call
https://github.com/pkp/pkp-lib/commit/a06c0be0947d8fe8ded2bda3b18697574ddc3670
Comment 2 James MacGregor 2013-01-21 22:38:06 PST
OK, this doesn't appear to be an issue with ocs master. ojs-stable-2_4 refers to getByUserId accurately. ojs-stable-2_3 refers to getNotificationsByUserId, but at the same time isn't broken -- in its NotificationDAO, the function is called that. So I think we're good.