Skip to content

Commit

Permalink
Fix usage of assert in saml2 code for php 7.2 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden committed May 9, 2019
1 parent 30c66fd commit 9ea699b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions classes/store.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class store extends \SimpleSAML\Store {
public function get($type, $key) {
global $DB;

assert('is_string($type)');
assert('is_string($key)');
assert(is_string($type));
assert(is_string($key));

if (strlen($key) > 50) {
$key = sha1($key);
Expand Down Expand Up @@ -93,9 +93,9 @@ public function get($type, $key) {
public function set($type, $key, $value, $expire = null) {
global $DB;

assert('is_string($type)');
assert('is_string($key)');
assert('is_null($expire) || (is_int($expire) && $expire > 2592000)');
assert(is_string($type));
assert(is_string($key));
assert(is_null($expire) || (is_int($expire) && $expire > 2592000));

if (rand(0, 1000) < 10) {
$this->delete_expired(); // TODO convert to task.
Expand Down Expand Up @@ -138,8 +138,8 @@ public function set($type, $key, $value, $expire = null) {
public function delete($type, $key) {
global $DB;

assert('is_string($type)');
assert('is_string($key)');
assert(is_string($type));
assert(is_string($key));

if (strlen($key) > 50) {
$key = sha1($key);
Expand Down

0 comments on commit 9ea699b

Please sign in to comment.