Skip to content

Commit

Permalink
Update extensions_model.php
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxudo committed Feb 21, 2024
1 parent f19e683 commit 8990f85
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions extensions_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function __construct($serial='')
$this->rs['path'] = '';
$this->rs['developer'] = '';
$this->rs['teamid'] = '';
$this->rs['codesign'] = '';
$this->rs['executable'] = '';
$this->rs['boot_uuid'] = null;
$this->rs['developer_mode'] = null; // Boolean
Expand All @@ -34,7 +35,6 @@ function __construct($serial='')
**/
function process($plist)
{

if ( ! $plist){
throw new Exception("Error Processing Request: No property list found", 1);
}
Expand Down Expand Up @@ -62,7 +62,12 @@ function process($plist)
foreach ($this->rs as $key => $value) {
// If key does not exist in $kext, null it
if ( ! array_key_exists($key, $kext) || $kext[$key] == '' && $kext[$key] != '0') {
$this->rs[$key] = null;
// Only some of the keys get nulled
if ($key == 'boot_uuid' || $key == 'developer_mode' || $key == 'extension_policies' || $key == 'state' || $key == 'categories'){
$this->rs[$key] = null;
} else {
$this->rs[$key] = "";
}
} else {
$this->rs[$key] = $kext[$key];
}
Expand Down

0 comments on commit 8990f85

Please sign in to comment.