mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Catch potential validation errors on unescape tool
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
4fd14e5859
commit
e4da00ca82
|
@ -72,8 +72,11 @@ class FixDoubleEscape extends Command
|
|||
foreach($classname::where("$field",'LIKE','%&%')->get() as $row) {
|
||||
|
||||
$fixed = html_entity_decode($row->{$field});
|
||||
if ($row->save()) {
|
||||
$this->info('Updating '.$field.' for '.$classname.' to '.$row->{$field}.' to '.$fixed);
|
||||
$row->save();
|
||||
} else {
|
||||
$this->error('Could NOT update '.$field.' for '.$classname.' to '.$row->{$field}.' to '.$fixed.': '.$row->getErrors());
|
||||
}
|
||||
$count[$classname][$field]++;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue