PHP 5.4 $ _GET注意:未定义的索引:

this Code works in PHP 5.3, but not in PHP 5.4 > Error Notice: Undefined index:

//station
$station = $_GET['station'];

if (!$station)
    $station = 'main';



//base path

it depends on the setting of your error_reporting, but you should always check if the 'station' was already set through the http(s) like www.example.com?station=piccadily

if (isset($_GET['station']) && $station = $_GET['station'])
else $station = 'main;

or simplify it to:

$station = isset($_GET['station']) ? $_GET['station'] : 'main';

since PHP7 you may write with coalesce operator:

$station = $_GET['station'] ?? 'main';
<?php 
    $station = $_GET['station'];
    error_reporting(0);
    if ( isset ( $station ) ) :
        $station = 'main';
    else :
        $action = 'null';
    endif;
 ?>