Skip to content

Messes with callbacks on array_filter #15

@herbdool

Description

@herbdool

I left the setting "Preserve array formatting" unchecked and it breaks the callback function. My suspicion is that it won't break if I enable the setting but I'm not sure.

   // Look through the child items for the MENU_DEFAULT_LOCAL_TASK.
-  $child_paths = array_filter(array_keys($items), function($p) use ($path) {
-    return preg_match("#^$path/[^/]*$#", $p);
+  $child_paths = array_filter(array_keys($items), ($p) ($path){
+    preg_match("#^$path/[^/]*$#", $p)
   });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions