From 96fcd2d09816f6809bf2e4913d14c3ebf48a70c2 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sat, 21 Mar 2015 03:25:35 +0000 Subject: [PATCH] Move strtolower function to reduce one line of code. --- app/devices/device_edit.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index 4c52815497..b06caa6e6e 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -80,8 +80,7 @@ require_once "resources/require.php"; if (count($_POST) > 0) { //devices $device_mac_address = check_str($_POST["device_mac_address"]); - $device_mac_address = strtolower($device_mac_address); - $device_mac_address = preg_replace('#[^a-fA-F0-9./]#', '', $device_mac_address); + $device_mac_address = strtolower(preg_replace('#[^a-fA-F0-9./]#', '', $device_mac_address)); $_POST["device_mac_address"] = $device_mac_address; $device_label = check_str($_POST["device_label"]); $device_vendor = check_str($_POST["device_vendor"]);