Skip to content

Commit

Permalink
Merge pull request #16068 from nextcloud/revert-15925-backport/15912/…
Browse files Browse the repository at this point in the history
…stable16

Revert "[stable16] Fix userid casting in notifications"
  • Loading branch information
rullzer authored Jun 25, 2019
2 parents cd69e90 + ab13fe8 commit 9487702
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions lib/private/Notification/Notification.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
declare (strict_types = 1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
Expand Down Expand Up @@ -134,7 +133,7 @@ public function __construct(IValidator $richValidator) {
* @throws \InvalidArgumentException if the app id is invalid
* @since 8.2.0
*/
public function setApp(string $app) {
public function setApp($app) {
if (!is_string($app) || $app === '' || isset($app[32])) {
throw new \InvalidArgumentException('The given app name is invalid');
}
Expand All @@ -156,7 +155,7 @@ public function getApp() {
* @throws \InvalidArgumentException if the user id is invalid
* @since 8.2.0
*/
public function setUser(string $user) {
public function setUser($user) {
if (!is_string($user) || $user === '' || isset($user[64])) {
throw new \InvalidArgumentException('The given user id is invalid');
}
Expand Down
5 changes: 2 additions & 3 deletions lib/public/Notification/INotification.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
declare (strict_types = 1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
Expand Down Expand Up @@ -37,7 +36,7 @@ interface INotification {
* @throws \InvalidArgumentException if the app id is invalid
* @since 9.0.0
*/
public function setApp(string $app);
public function setApp($app);

/**
* @return string
Expand All @@ -51,7 +50,7 @@ public function getApp();
* @throws \InvalidArgumentException if the user id is invalid
* @since 9.0.0
*/
public function setUser(string $user);
public function setUser($user);

/**
* @return string
Expand Down

0 comments on commit 9487702

Please sign in to comment.