refactor: Prevent function collisions with Laravel (#8166)

Make function call compatible
drop insensitive starts_with and ends_with for now as they aren't needed.
This commit is contained in:
Tony Murray
2018-01-29 15:58:21 -06:00
committed by Neil Lathwood
parent 1ee7d51f7a
commit b2762d9fa7
8 changed files with 56 additions and 73 deletions

View File

@@ -1005,7 +1005,7 @@ function discovery_process(&$valid, $device, $sensor_type, $pre_cache)
if (!is_numeric($tmp_value)) {
if ($sensor_type === 'temperature') {
// For temp sensors, try and detect fahrenheit values
if (ends_with($tmp_value, 'f', true)) {
if (ends_with($tmp_value, array('f', 'F'))) {
$user_function = 'fahrenheit_to_celsius';
}
}