From a76deb8833bee744a894ebaf7bd49e8ce4ea49fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Tue, 20 Oct 2009 08:23:09 +0000 Subject: [PATCH] None is equal to zero for php. use === operator to check the type --- planetlab/sites/join_request.php | 2 +- planetlab/sites/site.php | 2 +- planetlab/sites/sites.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/planetlab/sites/join_request.php b/planetlab/sites/join_request.php index ce7b309..815c328 100644 --- a/planetlab/sites/join_request.php +++ b/planetlab/sites/join_request.php @@ -68,7 +68,7 @@ function render_join_request_review($api, $site_id) { return; } $site = $sites[0]; - if ($site['enabled'] && $site['ext_consortium_id'] == $PENDING_CONSORTIUM_ID) { + if ($site['enabled'] && $site['ext_consortium_id'] === $PENDING_CONSORTIUM_ID) { print("

This site is already enabled

"); return; } diff --git a/planetlab/sites/site.php b/planetlab/sites/site.php index 807479d..d80dc5f 100644 --- a/planetlab/sites/site.php +++ b/planetlab/sites/site.php @@ -155,7 +155,7 @@ $peers->block_start ($peer_id); if ( $local_peer ) { // pending site global $PENDING_CONSORTIUM_ID; - if ( $ext_consortium_id == $PENDING_CONSORTIUM_ID) { + if ( $ext_consortium_id === $PENDING_CONSORTIUM_ID) { if ( ! $enabled ) plc_warning ("This site is under pending registration - Please visit " . href (l_sites_pending(),"this page") . diff --git a/planetlab/sites/sites.php b/planetlab/sites/sites.php index 8eb5a03..9b188b9 100644 --- a/planetlab/sites/sites.php +++ b/planetlab/sites/sites.php @@ -51,7 +51,7 @@ function site_status ($site) { if ( ! $site['enabled']) $messages [] = "Not enabled"; global $PENDING_CONSORTIUM_ID; - if ( $site['ext_consortium_id'] == $PENDING_CONSORTIUM_ID ) + if ( $site['ext_consortium_id'] === $PENDING_CONSORTIUM_ID ) $messages [] = "Pending registration"; // check that site has at least a PI and a tech -- 2.43.0