Index: trunk/extensions/inputbox/inputbox.php |
— | — | @@ -210,10 +210,11 @@ |
211 | 211 | } |
212 | 212 | |
213 | 213 | /** |
214 | | - * If the width is not supplied, set it to 50 |
| 214 | + * Validate the width; make sure it's a valid, positive integer |
215 | 215 | */ |
216 | 216 | function checkWidth() { |
217 | | - if( !$this->width || trim( $this->width ) == '' ) |
| 217 | + $this->width = intval( $this->width ); |
| 218 | + if( $this->width <= 0 ) |
218 | 219 | $this->width = 50; |
219 | 220 | } |
220 | 221 | |