Skip to content

Commit 9cbf903

Browse files
fix: update function signature for checkWriteAccess
1 parent 278effc commit 9cbf903

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

php-classes/Laddr/ProjectBuzzRequestHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected static function onRecordSaved(ActiveRecord $Buzz, $requestData)
4444
$Buzz->save();
4545
}
4646

47-
public static function checkWriteAccess(ActiveRecord $ProjectUpdate, $suppressLogin = false)
47+
public static function checkWriteAccess(ActiveRecord $ProjectUpdate = null, $suppressLogin = false)
4848
{
4949
// only allow creating, editing your own, and staff editing
5050
if (!$ProjectUpdate->isPhantom && ($ProjectUpdate->CreatorID != $GLOBALS['Session']->PersonID) && !$GLOBALS['Session']->hasAccountLevel('Staff')) {

php-classes/Laddr/ProjectUpdatesRequestHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public static function handleBrowseRequest($options = [], $conditions = [], $res
1919
return parent::handleBrowseRequest($options, $conditions, $responseID, $responseData);
2020
}
2121

22-
public static function checkWriteAccess(\ActiveRecord $ProjectUpdate, $suppressLogin = false)
22+
public static function checkWriteAccess(\ActiveRecord $ProjectUpdate = null, $suppressLogin = false)
2323
{
2424
// only allow creating, editing your own, and staff editing
2525
if (!$ProjectUpdate->isPhantom && ($ProjectUpdate->CreatorID != $GLOBALS['Session']->PersonID) && !$GLOBALS['Session']->hasAccountLevel('Staff')) {

0 commit comments

Comments
 (0)