diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index a21d55743b38..5e0acaf1e506 100644 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -533,7 +533,7 @@ public function getView($assetId = null) $settings = Setting::getSettings(); $qr_code = (object) array( - 'display' => $settings->qr_code === '1', + 'display' => $settings->qr_code == '1', 'height' => $this->qrCodeDimensions['height'], 'width' => $this->qrCodeDimensions['width'], 'url' => route('qr_code/hardware', $asset->id) @@ -561,7 +561,7 @@ public function getQrCode($assetId = null) $settings = Setting::getSettings(); if ($settings->qr_code === '1') { - $asset = Asset::find($assetId); + $asset = Asset::find($assetId); if (isset($asset->id)) { $renderer = new \BaconQrCode\Renderer\Image\Png; $renderer->setWidth($this->qrCodeDimensions['height']) diff --git a/app/controllers/admin/SettingsController.php b/app/controllers/admin/SettingsController.php index 00640e463076..02d6726e1b62 100644 --- a/app/controllers/admin/SettingsController.php +++ b/app/controllers/admin/SettingsController.php @@ -38,7 +38,7 @@ public function getIndex() public function getEdit() { $settings = Setting::orderBy('created_at', 'DESC')->paginate(10); - $is_gd_installed = !!extension_loaded('gd'); + $is_gd_installed = extension_loaded('gd'); return View::make('backend/settings/edit', compact('settings', 'is_gd_installed')); }