Skip to content

Commit 27d3d03

Browse files
TomWalravenfichtner
andcommitted
Changed int cast to string cast
Co-authored-by: Franco Fichtner <franco@lastsummer.de>
1 parent a49685b commit 27d3d03

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/opnsense/mvc/app/models/OPNsense/Routes/Migrations

src/opnsense/mvc/app/models/OPNsense/Routes/Migrations/M1_0_1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function run($model)
1515
foreach ($cfgObj->staticroutes->route as $route) {
1616
$uuid = (string)$route['uuid'];
1717
if (!empty($uuid) && isset($modelRoutes[$uuid]) && isset($route->disabled)) {
18-
$modelRoutes[$uuid]->enabled = ((int)$route->disabled === 1) ? 0 : 1;
18+
$modelRoutes[$uuid]->enabled = empty((string)$route->disabled) ? '1' : '0';
1919
}
2020
}
2121
}

0 commit comments

Comments
 (0)