Error
Call to a member function getName() on null Error thrown with message "Call to a member function getName() on null" Stacktrace: #2 Error in /home/f07c9ogk/public_html/functions.php:1742 #1 crm_get_meta in /home/f07c9ogk/public_html/src/pages/header.php:17 #0 include in /home/f07c9ogk/public_html/index.php:432
Stack frames (3):
2 Error
…/­functions.php1742
1 crm_get_meta
…/­src/­pages/­header.php17
0 include
…/­index.php432
/home/f07c9ogk/public_html/functions.php
        $meta['keywords'] = $projectObj->getSeoKeywords();
    }  elseif( 'project-information' == $_route  ) { 
        global $projectObj;
        if(empty($projectObj)) die;
        $meta['title'] = $projectObj->getName(). ' | '.__('Egypt Real Estate','realia');
        $meta['description'] = $projectObj->getName() . " " . $projectObj->getCommunityName() . " " . ' '.__('information','realia').', '.__('Developed by','realia').' ' . $projectObj->getDeveloperName(). ', '.__('Project Type','realia').' '. __($projectObj->getPropertyTypeName()[0],'realia'). ', '.__('Starting from','realia').' '. $projectObj->getPriceFrom();
        $meta['keywords'] = $projectObj->getSeoKeywords()." ".$projectObj->getName();
    }  elseif( 'project-units' == $_route  ) { 
        global $beds, $contract, $unit_types;
            $meta['title'] = ucwords( str_replace('-', " ", $unit_types) )  . " " . $projectObj->getName(). ' | '.__('Egypt Real Estate','realia');
            $meta['description'] =   ucwords( str_replace('-', " ", $unit_types) ) . " " . $projectObj->getName() . '. '.__('Developed by','realia').' ' . $projectObj->getDeveloperName(). ', '.__('Project Type','realia').' '. __($projectObj->getPropertyTypeName()[0],'realia'). ', '.__('Starting from','realia').' '. $projectObj->getPriceFrom();;
    }  elseif( 'project-links' == $_route  ) { 
        global $links;
        $meta['title'] = __("Properties","realia") . " " . __("in","realia") . " " . $projectObj->getName(). ' | '.__('Egypt Real Estate','realia');
        $meta['description'] =   __("Properties","realia") . " " . __("in","realia") . " " . $projectObj->getName() ;
    }  elseif( 'unit-type-type-community-page' == $_route  ) { 
        global $new_types,$community;
        $types_collect2 = array( "Apartment","Villa","Townhouse","Penthouse","Compound","Residential","Office","Retail","Plot","Clinic","Shop","Food","Studio","Duplex","Chalet","Palace","Serviced","Entertainment","Supermarket" ,"Pharmacy","Bank","Health","Store","Building" );
        $types_collect = array( "Apartment","Villa","Townhouse","Penthouse","Compound","Residential","Office","Retail","Plot","Clinic","Shop","Food & Beverage","Studio","Duplex","Chalet","Palace","Serviced Apartment","Entertainment","Supermarket" ,"Pharmacy","Bank","Health & Fitness","Store","Building" );
        $url_collect = explode('-',$new_types);
/home/f07c9ogk/public_html/src/pages/header.php
<html lang="<?php echo EL_LANG?>">
    <head>
        <meta charset="utf-8">
        <link rel="canonical" href="<?php echo crm_get_canonical_url(); ?>">
        <!--<link rel="amphtml" href="<?php //echo crm_get_amp_url($_route); ?>">-->
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
        <meta name="viewport" content="initial-scale=1, viewport-fit=cover">
        <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
        <?php $meta = crm_get_meta( $_route ); ?>
        <title><?php echo $meta['title']; ?></title>
        <meta name="description" content="<?php echo $meta['description']; ?>">
        <meta name="author" content="<?php echo $meta['author']; ?>">
        <meta name="keywords" content="<?php echo $meta['keywords']; ?>">
        <?php echo allowindex($_route);?>
        <?php ElbaytHelpers::getMetaimg(isset($metaimg) ? $metaimg : NULL ); ?>
        <meta property="og:title" content="<?php echo $meta['title']; ?>" />
        <meta property="og:type" content="website" />
        <meta property="og:url" content="<?php echo crm_get_canonical_url(); ?>" />
        <meta property="og:description" content="<?php echo $meta['description']; ?>" />
/home/f07c9ogk/public_html/index.php
    if( $_route != 'sitemap' && !$amp ) {
        //echo "<script>console.log('Debug Objects: " . $_route . "' );</script>";
        if (in_array($_route, array("webchat", "footer-load", "homepage-load", "homepage-mobile-load"))){
            include sprintf(__DIR__.'/src/pages/%s.php', $_route);
        }/* elseif (!(in_array($_route, array("homepage-test", "units", "unit", "project")))){
            if(!$hidehtml) include __DIR__.'/src/pages/header.php'; 
            include sprintf(__DIR__.'/src/pages/%s.php', $_route);
            if(!$hidehtml) include __DIR__.'/src/pages/footer.php';
        }*/ else {  
            if(!$hidehtml) include __DIR__.'/src/pages/header.php'; 
            include sprintf(__DIR__.'/src/pages/%s.php', $_route);
            if(!$hidehtml) include __DIR__.'/src/pages/footer.php';
        }
    }
 
    $response->setContent(ob_get_clean());
    $response->send();
} catch (Exception $e) {
    $_route = '404';
}

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /en/projects/suez/sokhna/zafarana/la-vista-ray1/type/townhouse
USER f07c9ogk
HOME /home/f07c9ogk
SCRIPT_NAME /index.php
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/2.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /en/projects/suez/sokhna/zafarana/la-vista-ray1/type/townhouse
REMOTE_PORT 52362
SCRIPT_FILENAME /home/f07c9ogk/public_html/index.php
SERVER_ADMIN webmaster@elbayt.com
CONTEXT_DOCUMENT_ROOT /home/f07c9ogk/public_html
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /home/f07c9ogk/public_html
REMOTE_ADDR 34.228.168.200
SERVER_PORT 443
SERVER_ADDR 162.240.238.231
SERVER_NAME elbayt.com
SERVER_SIGNATURE
PATH /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin
HTTP_HOST elbayt.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
proxy-nokeepalive 1
H2_STREAM_TAG 19899-641-3
H2_STREAM_ID 3
H2_PUSHED_ON
H2_PUSHED
H2_PUSH off
H2PUSH off
HTTP2 on
SSL_TLS_SNI elbayt.com
HTTPS on
UNIQUE_ID ZgU2AeVGeglZUT5qGBiY_QAARws
REDIRECT_STATUS 200
REDIRECT_H2_STREAM_TAG 19899-641-3
REDIRECT_H2_STREAM_ID 3
REDIRECT_H2_PUSHED_ON
REDIRECT_H2_PUSHED
REDIRECT_H2_PUSH off
REDIRECT_H2PUSH off
REDIRECT_HTTP2 on
REDIRECT_SSL_TLS_SNI elbayt.com
REDIRECT_HTTPS on
REDIRECT_UNIQUE_ID ZgU2AeVGeglZUT5qGBiY_QAARws
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711617537.4676
REQUEST_TIME 1711617537
argv Array ( )
argc 0
empty
0. Whoops\Handler\PrettyPageHandler