Fix regression (intra-rc) where entity not passed to hook, and fix CRM-21841 as by...
authoreileen <emcnaughton@wikimedia.org>
Thu, 22 Mar 2018 11:49:02 +0000 (00:49 +1300)
committereileen <emcnaughton@wikimedia.org>
Thu, 22 Mar 2018 11:49:02 +0000 (00:49 +1300)
The self::objectType is passing NULL - the object type on the parent.

Switching to static::objectType uses the child.

https://stackoverflow.com/questions/1912902/what-exactly-are-late-static-bindings-in-php

CRM/Core/Task.php

index caa1107f8bdc7b65b5986b8217f7a8300495912f..413328b485aaa96a1ce04320e2631a91a6e207e9 100644 (file)
@@ -82,7 +82,7 @@ abstract class CRM_Core_Task {
    *            ]
    */
   public static function tasks() {
-    CRM_Utils_Hook::searchTasks(self::$objectType, self::$_tasks);
+    CRM_Utils_Hook::searchTasks(static::$objectType, self::$_tasks);
     asort(self::$_tasks);
 
     return self::$_tasks;