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
eee3729b85
commit
4b786eaad5
|
@ -83,8 +83,8 @@ $statusData = array(
|
|||
'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' ),
|
||||
'TotalEvents' => array( 'sql' => '(SELECT count(Events.Id) FROM Events WHERE Events.MonitorId = Monitors.Id' ),
|
||||
'Status' => array( 'zmu' => '-m '.escapeshellarg($_REQUEST['id'][0]).' -s' ),
|
||||
'FrameRate' => array( 'zmu' => '-m '.escapeshellarg($_REQUEST['id'][0]).' -f' ),
|
||||
'Status' => (isset($_REQUEST['id'])?array( 'zmu' => '-m '.escapeshellarg($_REQUEST['id'][0]).' -s' ):null),
|
||||
'FrameRate' => (isset($_REQUEST['id'])?array( 'zmu' => '-m '.escapeshellarg($_REQUEST['id'][0]).' -f' ):null),
|
||||
),
|
||||
),
|
||||
'events' => array(
|
||||
|
@ -204,6 +204,7 @@ function collectData() {
|
|||
$fieldSql = array();
|
||||
$joinSql = array();
|
||||
$groupSql = array();
|
||||
$values = array();
|
||||
|
||||
$elements = &$entitySpec['elements'];
|
||||
$lc_elements = array_change_key_case( $elements );
|
||||
|
@ -258,7 +259,6 @@ function collectData() {
|
|||
if ( $id && !empty($entitySpec['selector']) ) {
|
||||
$index = 0;
|
||||
$where = array();
|
||||
$values = array();
|
||||
foreach( $entitySpec['selector'] as $selIndex => $selector ) {
|
||||
$selectorParamName = ':selector' . $selIndex;
|
||||
if ( is_array( $selector ) ) {
|
||||
|
|
Loading…
Reference in New Issue