Skip to content

Commit cb29af2

Browse files
Fix views made with whitespace-only names (D1060) (#592)
* Fix views made with whitespace-only names * Update error message to improve clarity --------- Co-authored-by: Pawel <p.wlodarski@ctrlo.com>
1 parent 89903ad commit cb29af2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/GADS/View.pm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,10 @@ sub write
338338
length $self->name < 128
339339
or error __"View name must be less than 128 characters";
340340

341+
# Names consisting of just whitespace characters cause issues when displaying a view
342+
$self->name !~ /^\s*$/
343+
or error __"View name must not contain only whitespace characters";
344+
341345
my $global = !$self->layout->user ? 1 : $self->global;
342346

343347
$self->clear_writable; # Force rebuild based on any updated values

0 commit comments

Comments
 (0)