Title: Invalid regular expression
Last modified: August 31, 2016

---

# Invalid regular expression

 *  [pandaura](https://wordpress.org/support/users/pandaura/)
 * (@pandaura)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/invalid-regular-expression/)
 * Hi,
 * There is an error that was logged in the console thrown by YOP Polls widget.
 * Uncaught SyntaxError: Invalid regular expression: missing /
 * Will there be an update for this?
 * [https://wordpress.org/plugins/yop-poll/](https://wordpress.org/plugins/yop-poll/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [YOP](https://wordpress.org/support/users/yourownprogrammer/)
 * (@yourownprogrammer)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/invalid-regular-expression/#post-7132549)
 * Hello
 * Can you send us a link to your poll so we can look into this?
 * Thank you.
    Darrell
 *  [sajetek](https://wordpress.org/support/users/sajetek/)
 * (@sajetek)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/invalid-regular-expression/#post-7132805)
 * Hello, Im not the poster but i’m having the same issue till now, please see the
   following link.
 *  [sajetek](https://wordpress.org/support/users/sajetek/)
 * (@sajetek)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/invalid-regular-expression/#post-7132806)
 * Hello, Im not the poster but i’m having the same issue till now, please see the
   following link.
 * [Check POLL](http://tinyurl.com/glpqq5s)
 *  [santonowicz](https://wordpress.org/support/users/santonowicz/)
 * (@santonowicz)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-regular-expression/#post-7132816)
 * Line 631 of inc/maintenance.php has:
 *     ```
       if(count<cols[quest][2])
       { width = parseInt( %POLL-WIDTH% / cols[quest][0]);
       ```
   
 * basically if POLL-WIDTH is empty for whatever reason, the js is interpreted as
   a regex (which would be invalid) i.e.
 * `parseInt( / cols[quest][0] )`
 * PHP side it should probably have a default value or check for null, user side
   just make sure your poll has a width.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Invalid regular expression’ is closed to new replies.

 * ![](https://ps.w.org/yop-poll/assets/icon-256x256.png?rev=3524390)
 * [YOP Poll](https://wordpress.org/plugins/yop-poll/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yop-poll/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yop-poll/)
 * [Active Topics](https://wordpress.org/support/plugin/yop-poll/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yop-poll/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yop-poll/reviews/)

## Tags

 * [widget](https://wordpress.org/support/topic-tag/widget/)
 * [Yop Polls](https://wordpress.org/support/topic-tag/yop-polls/)

 * 4 replies
 * 4 participants
 * Last reply from: [santonowicz](https://wordpress.org/support/users/santonowicz/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/invalid-regular-expression/#post-7132816)
 * Status: not resolved