}
}
-$notifications = array_merge($notifications, cache_helper::warnings($stores));
+// Add cache store warnings to the list of notifications.
+// Obviously as these are warnings they are show as failures.
+foreach (cache_helper::warnings($stores) as $warning) {
+ $notifications[] = array($warning, false);
+}
$PAGE->set_title($title);
$PAGE->set_heading($SITE->fullname);
* This should be used to notify things like configuration conflicts etc.
* The warnings returned here will be displayed on the cache configuration screen.
*
- * @return array[] Returns an array of arrays with the format:
- * $notifications = array(
- * array('This is a success message', true),
- * array('This is a failure message', false),
- * );
+ * @return string[] An array of warning strings from the store instance.
*/
public function get_warnings() {
return array();
$host = array_shift($bits);
$port = (count($bits)) ? array_shift($bits) : '11211';
foreach ($this->servers as $server) {
- if ($server[0] === $host && $server[1] === $port) {
+ if ($server[0] === $host && $server[1] == $port) {
$warnings[] = get_string('sessionhandlerconflict', 'cachestore_memcache', $this->my_name());
break;
}