diff --git a/app/Http/Controllers/Users/LDAPImportController.php b/app/Http/Controllers/Users/LDAPImportController.php index 88a6b207df..b86be03d99 100644 --- a/app/Http/Controllers/Users/LDAPImportController.php +++ b/app/Http/Controllers/Users/LDAPImportController.php @@ -56,6 +56,10 @@ class LDAPImportController extends Controller $ldap_results_json = Artisan::output(); $ldap_results = json_decode($ldap_results_json, true); + if (!$ldap_results) { + return redirect()->back()->withInput()->with('error', trans('general.no_results')); + } + // Direct user to appropriate status page. if ($ldap_results['error']) { return redirect()->back()->withInput()->with('error', $ldap_results['error_message']); diff --git a/app/Models/License.php b/app/Models/License.php index 44f1f45b70..2ea10939fa 100755 --- a/app/Models/License.php +++ b/app/Models/License.php @@ -32,6 +32,7 @@ class License extends Depreciable protected $guarded = 'id'; protected $table = 'licenses'; + protected $casts = [ 'purchase_date' => 'date', 'expiration_date' => 'date', diff --git a/resources/views/licenses/edit.blade.php b/resources/views/licenses/edit.blade.php index cdbbc23e74..b0ff9063f2 100755 --- a/resources/views/licenses/edit.blade.php +++ b/resources/views/licenses/edit.blade.php @@ -79,7 +79,7 @@
- +
{!! $errors->first('expiration_date', '') !!} @@ -93,7 +93,7 @@
- +
{!! $errors->first('termination_date', '') !!}