Skip to content

Commit

Permalink
Added isset.
Browse files Browse the repository at this point in the history
Fix coding style
  • Loading branch information
huwcbjones committed Aug 31, 2017
1 parent 106f62b commit 83fe964
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/View/Helper.php
Expand Up @@ -197,9 +197,9 @@ protected function _confirm($message, $okCode, $cancelCode = '', $options = [])
*/
public function addClass(array $options = [], $class = null, $key = 'class')
{
if (is_array($options[$key])) {
if (isset($options[$key]) && is_array($options[$key])) {
$options[$key][] = $class;
} else if (isset($options[$key]) && trim($options[$key])) {
} elseif (isset($options[$key]) && trim($options[$key])) {
$options[$key] .= ' ' . $class;
} else {
$options[$key] = $class;
Expand Down

0 comments on commit 83fe964

Please sign in to comment.