From cb8bc6f4099db672bd39674684004a3a48366d60 Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Sat, 28 Jul 2018 20:00:04 +0200
Subject: [PATCH] Remove occurences of assert() with string argument

---
 modules/core/www/login.php                 | 2 +-
 modules/discopower/lib/PowerIdPDisco.php   | 2 +-
 modules/discopower/templates/disco.tpl.php | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/core/www/login.php b/modules/core/www/login.php
index a09082ad7..d4babee68 100644
--- a/modules/core/www/login.php
+++ b/modules/core/www/login.php
@@ -33,7 +33,7 @@ if (array_key_exists(\SimpleSAML\Auth\State::EXCEPTION_PARAM, $_REQUEST)) {
     // This is just a simple example of an error
 
     $state = \SimpleSAML\Auth\State::loadExceptionState();
-    assert('array_key_exists(\SimpleSAML\Auth\State::EXCEPTION_DATA, $state)');
+    assert(array_key_exists(\SimpleSAML\Auth\State::EXCEPTION_DATA, $state));
     $e = $state[\SimpleSAML\Auth\State::EXCEPTION_DATA];
 
     throw $e;
diff --git a/modules/discopower/lib/PowerIdPDisco.php b/modules/discopower/lib/PowerIdPDisco.php
index a913aa49f..c8493a07d 100644
--- a/modules/discopower/lib/PowerIdPDisco.php
+++ b/modules/discopower/lib/PowerIdPDisco.php
@@ -403,7 +403,7 @@ class PowerIdPDisco extends \SimpleSAML\XHTML\IdPDisco
      */
     protected function setPreviousIdP($idp)
     {
-        assert('is_string($idp)');
+        assert(is_string($idp));
 
         if ($this->cdcDomain === null) {
             parent::setPreviousIdP($idp);
diff --git a/modules/discopower/templates/disco.tpl.php b/modules/discopower/templates/disco.tpl.php
index cbb3c787d..396b15273 100644
--- a/modules/discopower/templates/disco.tpl.php
+++ b/modules/discopower/templates/disco.tpl.php
@@ -50,7 +50,7 @@ function showEntry($t, $metadata, $favourite = FALSE) {
 function getTranslatedName($t, $metadata) {
 	if (isset($metadata['UIInfo']['DisplayName'])) {
 		$displayName = $metadata['UIInfo']['DisplayName'];
-		assert('is_array($displayName)'); // Should always be an array of language code -> translation
+		assert(is_array($displayName)); // Should always be an array of language code -> translation
 		if (!empty($displayName)) {
 			return $t->getTranslator()->getPreferredTranslation($displayName);
 		}
-- 
GitLab