fix errors when ['id'] does not exist, and move the definition of values up because we use it outside the block it is defined in
This commit is contained in:
parent
df9f6103e4
commit
e123e689ca
|
@ -83,8 +83,8 @@ $statusData = array(
|
||||||
'MinEventId' => array( 'sql' => '(SELECT min(Events.Id) FROM Events WHERE Events.MonitorId = Monitors.Id' ),
|
'MinEventId' => array( 'sql' => '(SELECT min(Events.Id) FROM Events WHERE Events.MonitorId = Monitors.Id' ),
|
||||||
'MaxEventId' => array( 'sql' => '(SELECT max(Events.Id) FROM Events WHERE Events.MonitorId = Monitors.Id' ),
|
'MaxEventId' => array( 'sql' => '(SELECT max(Events.Id) FROM Events WHERE Events.MonitorId = Monitors.Id' ),
|
||||||
'TotalEvents' => array( 'sql' => '(SELECT count(Events.Id) FROM Events WHERE Events.MonitorId = Monitors.Id' ),
|
'TotalEvents' => array( 'sql' => '(SELECT count(Events.Id) FROM Events WHERE Events.MonitorId = Monitors.Id' ),
|
||||||
'Status' => array( 'zmu' => '-m '.escapeshellarg($_REQUEST['id'][0]).' -s' ),
|
'Status' => (isset($_REQUEST['id'])?array( 'zmu' => '-m '.escapeshellarg($_REQUEST['id'][0]).' -s' ):null),
|
||||||
'FrameRate' => array( 'zmu' => '-m '.escapeshellarg($_REQUEST['id'][0]).' -f' ),
|
'FrameRate' => (isset($_REQUEST['id'])?array( 'zmu' => '-m '.escapeshellarg($_REQUEST['id'][0]).' -f' ):null),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'events' => array(
|
'events' => array(
|
||||||
|
@ -204,6 +204,7 @@ function collectData() {
|
||||||
$fieldSql = array();
|
$fieldSql = array();
|
||||||
$joinSql = array();
|
$joinSql = array();
|
||||||
$groupSql = array();
|
$groupSql = array();
|
||||||
|
$values = array();
|
||||||
|
|
||||||
$elements = &$entitySpec['elements'];
|
$elements = &$entitySpec['elements'];
|
||||||
$lc_elements = array_change_key_case( $elements );
|
$lc_elements = array_change_key_case( $elements );
|
||||||
|
@ -258,7 +259,6 @@ function collectData() {
|
||||||
if ( $id && !empty($entitySpec['selector']) ) {
|
if ( $id && !empty($entitySpec['selector']) ) {
|
||||||
$index = 0;
|
$index = 0;
|
||||||
$where = array();
|
$where = array();
|
||||||
$values = array();
|
|
||||||
foreach( $entitySpec['selector'] as $selIndex => $selector ) {
|
foreach( $entitySpec['selector'] as $selIndex => $selector ) {
|
||||||
$selectorParamName = ':selector' . $selIndex;
|
$selectorParamName = ':selector' . $selIndex;
|
||||||
if ( is_array( $selector ) ) {
|
if ( is_array( $selector ) ) {
|
||||||
|
|
Loading…
Reference in New Issue