Skip to content

Commit

Permalink
Dev: Show expression error message for COMPARE failure
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Oct 14, 2019
1 parent efa8a10 commit 0dee716
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions application/helpers/expressions/em_core_helper.php
Expand Up @@ -1479,6 +1479,15 @@ public function GetPrettyPrintString()
case 'NUMBER':
$stringParts[] = $token[0];
break;
case 'COMPARE':
if ($thisTokenHasError) {
$stringParts[] = "<span title='".implode('; ', $messages)."' class='em-assign'>";

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Oct 15, 2019

Collaborator

Think class em-assign must be used only for assignment ;). Adding a class seem better (in my opinion)

This comment has been minimized.

Copy link
@olleharstedt

olleharstedt Oct 15, 2019

Author Contributor

Ah, sorry. Copy-paste, didn't see. Should be em-error or similar.

$stringParts[] = ' '.$token[0].' ';
$stringParts[] = "</span>";
} else {
$stringParts[] = ' '.$token[0] . ' ';
}
break;
default:
$stringParts[] = ' '.$token[0].' ';
break;
Expand Down

0 comments on commit 0dee716

Please sign in to comment.