[REF] Remove code Coleman hates
authoreileen <emcnaughton@wikimedia.org>
Tue, 24 Nov 2020 03:30:44 +0000 (16:30 +1300)
committereileen <emcnaughton@wikimedia.org>
Tue, 24 Nov 2020 03:30:44 +0000 (16:30 +1300)
CRM/Core/Invoke.php

index 780ae182fa8933155968e5feb193f2e11e5cc8af..bcb6da8a9892b2a76e7be557bd6978f90e309f88 100644 (file)
@@ -277,11 +277,11 @@ class CRM_Core_Invoke {
       if (is_array($item['page_callback']) || strpos($item['page_callback'], ':')) {
         $result = call_user_func(Civi\Core\Resolver::singleton()->get($item['page_callback']));
       }
-      elseif (strstr($item['page_callback'], '_Form')) {
+      elseif (strpos($item['page_callback'], '_Form') !== FALSE) {
         $wrapper = new CRM_Utils_Wrapper();
         $result = $wrapper->run(
-          CRM_Utils_Array::value('page_callback', $item),
-          CRM_Utils_Array::value('title', $item),
+          $item['page_callback'] ?? NULL,
+          $item['title'] ?? NULL,
           $pageArgs ?? NULL
         );
       }