diff options
Diffstat (limited to '')
-rw-r--r-- | model/Room.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/model/Room.php b/model/Room.php index e282b0b..6e37043 100644 --- a/model/Room.php +++ b/model/Room.php @@ -6,6 +6,9 @@ class Room extends ModelBase public function __construct($slug) { + if(preg_match('/[^a-z0-9_\-]/i', $slug)) + throw new Exception('Room Slug contains invalid Characters: "'.$slug.'"'); + if(! $this->has('ROOMS.'.$slug)) throw new NotFoundException('Room '.$slug); |