Commit 7ca870e7 authored by Ra Mänd's avatar Ra Mänd
Browse files

Performance: explode() is used in the context of counting substring occurrences.

parent 354d0c03
......@@ -234,7 +234,7 @@ function field_collection_menu() {
foreach (field_info_fields() as $field) {
if ($field['type'] == 'field_collection') {
$path = field_collection_field_get_path($field);
$count = count(explode('/', $path));
$count = substr_count($path, '/') + 1;
$items[$path . '/%field_collection_item'] = array(
'page callback' => 'field_collection_item_page_view',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment