diff --git a/lists/RegexpFactory.php b/lists/RegexpFactory.php
--- a/lists/RegexpFactory.php
+++ b/lists/RegexpFactory.php
@@ -58,7 +58,7 @@
      */
     public function isValid () {
         $this->lastError = '';
-        set_error_handler('self::handleErrors');
+        set_error_handler([$this, "handleErrors"]);
         $result = preg_match($this->expression, "");
         restore_error_handler();
         if ($this->lastError === '' && $result === false) {