if (!in_array(trim($token), array('and', 'or', 'not')) && !is_ipaddr($token) && !is_subnet($token)) { $input_errors[] = sprintf(gettext("A valid IP address or CIDR block must be specified. [%s]"), $token); } } } if (!empty($pconfig['port']) && !is_port(ltrim(trim($pconfig['port']), 'not'))) { $input_errors[] = gettext("Invalid value specified for port."); } if (!empty($pconfig['snaplen']) && (!is_numeric($pconfig['snaplen']) || $snaplen < 0)) { $input_errors[] = gettext("Invalid value specified for packet length."); } if (!empty($pconfig['count']) && (!is_numeric($pconfig['count']) || $count < 0)) { $input_errors[] = gettext("Invalid value specified for packet count."); } if (count($input_errors) == 0) { start_capture($pconfig); } } elseif (!empty($pconfig['stop'])) { stop_capture(); } elseif (!empty($pconfig['remove'])) { if (file_exists('/root/packetcapture.cap')) { unlink('/root/packetcapture.cap'); } header("Location: diag_packet_capture.php"); exit; } } legacy_html_escape_form_data($pconfig); include "head.inc"; ?> <body>
$struct_2 = array( 1 => array( 'foo' => 'baz', ), 'woo' => 'yay', ); echo "1..36\n"; # # these should pass # start_capture(); ok(1, 'ok()'); check_capture(true); is(2, 2, 'is()'); check_capture(true); is("2", 2, 'is()'); check_capture(true); isnt(2, 3, 'isnt()'); check_capture(true); isnt(2, "3", 'isnt()'); check_capture(true);