Merge pull request #17051 from eileenmcnaughton/ex
[civicrm-core.git] / Civi / Api4 / Action / GetActions.php
index a1d2b9413272de35726087aa09c69418add302b2..bb82f93555cb32c0041265b57b53f985576ffe69 100644 (file)
@@ -66,7 +66,7 @@ class GetActions extends BasicGetAction {
     if (is_dir($dir)) {
       foreach (glob("$dir/*.php") as $file) {
         $matches = [];
-        preg_match('/(\w*).php/', $file, $matches);
+        preg_match('/(\w*)\.php$/', $file, $matches);
         $actionName = array_pop($matches);
         $actionClass = new \ReflectionClass('\\Civi\\Api4\\Action\\' . $this->_entityName . '\\' . $actionName);
         if ($actionClass->isInstantiable() && $actionClass->isSubclassOf('\\Civi\\Api4\\Generic\\AbstractAction')) {