[mapguide-commits] r10059 - in branches/4.0/MgDev/Web/src: mapadmin mapviewerphp

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Nov 10 07:06:41 PST 2023


Author: jng
Date: 2023-11-10 07:06:39 -0800 (Fri, 10 Nov 2023)
New Revision: 10059

Modified:
   branches/4.0/MgDev/Web/src/mapadmin/resizablepagecomponents.php
   branches/4.0/MgDev/Web/src/mapviewerphp/mapagentcapture.php
Log:
Update final cases of instanceof exception checks in PHP code

Fixes #2876

Modified: branches/4.0/MgDev/Web/src/mapadmin/resizablepagecomponents.php
===================================================================
--- branches/4.0/MgDev/Web/src/mapadmin/resizablepagecomponents.php	2023-09-18 05:30:32 UTC (rev 10058)
+++ branches/4.0/MgDev/Web/src/mapadmin/resizablepagecomponents.php	2023-11-10 15:06:39 UTC (rev 10059)
@@ -2093,13 +2093,14 @@
     }
     function CheckForFatalMgException( $exception )
     {
-        if ( $exception instanceof MgAuthenticationFailedException ||
-             $exception instanceof MgConnectionFailedException ||
-             $exception instanceof MgConnectionNotOpenException ||
-             $exception instanceof MgDuplicateSessionException ||
-             $exception instanceof MgLicenseException ||
-             $exception instanceof MgLicenseExpiredException ||
-             $exception instanceof MgSessionExpiredException )
+        $exCode = $exception->GetExceptionCode();
+        if ( $exCode == MgExceptionCodes::MgAuthenticationFailedException ||
+             $exCode == MgExceptionCodes::MgConnectionFailedException ||
+             $exCode == MgExceptionCodes::MgConnectionNotOpenException ||
+             $exCode == MgExceptionCodes::MgDuplicateSessionException ||
+             $exCode == MgExceptionCodes::MgLicenseException ||
+             $exCode == MgExceptionCodes::MgLicenseExpiredException ||
+             $exCode == MgExceptionCodes::MgSessionExpiredException )
         {
             LogoutWithFatalException();
         }

Modified: branches/4.0/MgDev/Web/src/mapviewerphp/mapagentcapture.php
===================================================================
--- branches/4.0/MgDev/Web/src/mapviewerphp/mapagentcapture.php	2023-09-18 05:30:32 UTC (rev 10058)
+++ branches/4.0/MgDev/Web/src/mapviewerphp/mapagentcapture.php	2023-11-10 15:06:39 UTC (rev 10059)
@@ -167,7 +167,7 @@
             {
                 echo $val;
                 ob_flush();
-                flush();s
+                flush();
                 $len = $byteReader->Read($val, 4096);
             }
         }



More information about the mapguide-commits mailing list