diff --git a/www/module.php b/www/module.php
index 19ccc586e854fde7414a4288e716e59bfd7a497f..14bfd4c22074d37d3f24322f8665c10d1e926efd 100644
--- a/www/module.php
+++ b/www/module.php
@@ -75,9 +75,9 @@ try {
 	 * URL will detect both '../' and './'. Searching for '\' will detect attempts to
 	 * use Windows-style paths.
 	 */
-	if (strpos($url, '\\')) {
+	if (strpos($url, '\\') !== FALSE) {
 		throw new SimpleSAML_Error_BadRequest('Requested URL contained a backslash.');
-	} elseif (strpos($url, './')) {
+	} elseif (strpos($url, './') !== FALSE) {
 		throw new SimpleSAML_Error_BadRequest('Requested URL contained \'./\'.');
 	}