Loosen action typing - doing nothing is doing something
authorEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 22 Sep 2023 07:57:17 +0000 (19:57 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 22 Sep 2023 07:57:17 +0000 (19:57 +1200)
CRM/Core/Form.php

index 424c7cc6ee3fcc4fa0b8e62496cc3a18669d012d..d0f17d883d0e9b2d2254950d25c1d537faec956d 100644 (file)
@@ -1309,10 +1309,13 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
   /**
    * Getter for action.
    *
-   * @return int
+   * @return int|null
    */
   public function getAction() {
     if (!is_numeric($this->_action)) {
+      if (!$this->_action) {
+        return NULL;
+      }
       CRM_Core_Error::deprecatedWarning('action should be an integer');
       return $this->_action;
     }