diff --git a/lib/ezutils/classes/ezsys.php b/lib/ezutils/classes/ezsys.php
index <HASH>..<HASH> 100644
--- a/lib/ezutils/classes/ezsys.php
+++ b/lib/ezutils/classes/ezsys.php
@@ -734,6 +734,12 @@ class eZSys
             {
                 $port = self::serverVariable( 'SERVER_PORT' );
             }
+
+            if ( !$port )
+            {
+                $port = 80;
+            }
+
             $GLOBALS['eZSysServerPort'] = $port;
         }
         return $GLOBALS['eZSysServerPort'];
Added static fallback in case that the ServerVariable 'SERVER_PORT' is not set (e.g. during Shell execution)