Skip to content

Commit

Permalink
Optimize hot code in isHttps()
Browse files Browse the repository at this point in the history
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
  • Loading branch information
kamil-tekiela committed Mar 12, 2023
1 parent a641ed3 commit 50d6a75
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libraries/classes/Config.php
Expand Up @@ -775,8 +775,9 @@ public function checkUploadSize(): void
*/
public function isHttps(): bool
{
if ($this->get('is_https') !== null) {
return (bool) $this->get('is_https');
$is_https = $this->get('is_https');
if ($is_https !== null) {
return (bool) $is_https;
}

$url = $this->get('PmaAbsoluteUri');
Expand Down

0 comments on commit 50d6a75

Please sign in to comment.