]> git.mxchange.org Git - friendica.git/commitdiff
Fix Undefined index: HTTP_USER_AGENT in App
authorHypolite Petovan <mrpetovan@gmail.com>
Tue, 3 Jul 2018 02:19:21 +0000 (22:19 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Tue, 3 Jul 2018 02:19:21 +0000 (22:19 -0400)
src/App.php

index f4f5545bb32d2ed86472a9479a76fb0796d11337..92ff0571387cbd928f293698ef6acf88535ac703 100644 (file)
@@ -293,7 +293,7 @@ class App
                $this->is_tablet = $mobile_detect->isTablet();
 
                // Friendica-Client
-               $this->is_friendica_app = ($_SERVER['HTTP_USER_AGENT'] == 'Apache-HttpClient/UNAVAILABLE (java 1.4)');
+               $this->is_friendica_app = isset($_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_USER_AGENT'] == 'Apache-HttpClient/UNAVAILABLE (java 1.4)';
 
                // Register template engines
                $this->register_template_engine('Friendica\Render\FriendicaSmartyEngine');