Skip to content

Commit

Permalink
MDL-53947 memcached: Fix memcached session warning on PHP7
Browse files Browse the repository at this point in the history
  • Loading branch information
sk-unikent authored and junpataleta committed Jun 7, 2016
1 parent 4ee8ef5 commit 1f5a347
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/classes/session/memcached.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ public function init() {
ini_set('memcached.sess_locking', '1'); // Locking is required!

// Try to configure lock and expire timeouts - ignored if memcached is before version 2.2.0.
ini_set('memcached.sess_lock_max_wait', $this->acquiretimeout);
if (version_compare($version, '3.0.0-dev') >= 0) {
ini_set('memcached.sess_lock_wait_max', $this->acquiretimeout * 1000);
} else {
ini_set('memcached.sess_lock_max_wait', $this->acquiretimeout);
}

ini_set('memcached.sess_lock_expire', $this->lockexpire);
}

Expand Down

0 comments on commit 1f5a347

Please sign in to comment.