http://localhost/drupal/admin/structure/features/cleanup/clear
After calling cleanup seeing:

Notice: Array to string conversion in features_get_orphans() (line 700 of /home/s8weber/svc/drupal/app/drupal/profiles/uwlib_profile/modules/contrib/features/features.module).
Notice: Array to string conversion in features_get_orphans() (line 700 of /home/s8weber/svc/drupal/app/drupal/profiles/uwlib_profile/modules/contrib/features/features.module).
Notice: Array to string conversion in features_get_orphans() (line 700 of /home/s8weber/svc/drupal/app/drupal/profiles/uwlib_profile/modules/contrib/features/features.module).
....

Looking into the features.module i did some debugging:

function features_get_orphans($reset = FALSE) {
...
        var_dump($modules[$module]->required_by);
        echo 'ssssssssssssssssssssssssssss';
        var_dump($enabled);
        die;
        $dependents = array_intersect($modules[$module]->required_by, $enabled);
...

And the debugging output truncated:

array(16) {
  ["date_views"]=>
  array(1) {
    ["name"]=>
    string(5) "views"
  }
  ["draggableviews"]=>
  array(1) {
    ["name"]=>
    string(5) "views"
.......
}
ssssssssssssssssssssssssssss
array(57) {
  ["strongarm"]=>
  string(9) "strongarm"
  ["block"]=>
  string(5) "block"
  ["webform"]=>
  string(7) "webform"
..........
}

It seems that the format of the array has changed
$modules[$module]->required_by is nested array of strings.
$enabled = module_list() is array of strings .

Drupal 7.x commit 33234ac2d
Date: Wed Sep 5 22:58:31 2012 -0700

Comments

Also hit another notice.

Notice: Array to string conversion in features_export_prepare() (line 190 of /home/s8weber/svc/drupal/app/drupal/profiles/uwlib_profile/modules/contrib/features/features.export.inc).

Priority:Major» Normal

Also reproducing this in local development. Not sure that it's major but it is slightly annoying when doing a lot of features development

Do you have a step-by-step procedure for triggering this that you can share? Looks like it only happens when there are orphaned dependencies and I've had a hard time making this happen easily.

StatusFileSize
new186 bytes

Meanwhile a better solution is provided, you can fix this including this piece of code:

      foreach($modules[$module]->required_by as $module_name => $dependency){
          $modules[$module]->required_by[$module_name] = $dependency['name'];
       }

Check the attached patch, apply in features.module file.
My version of Features is 7.x-1.0

Status:Active» Needs review

Can you please roll that patch properly? I don't see any of the normal "git diff" header information in your patch file. Also, for patch naming, please see http://drupal.org/patch/submit.

(This is a simple enough patch that I'll try to take a look, but you should learn how to submit patches properly or you'll run into trouble with the community)

Also, seems like your code should be modifying the $dependents array and not the $modules[$module]->required_by[$module_name] array directly.

I've not had a chance to look at the code, nor test on another server yet, but I did get this error after upgrading to the latest dev release. I suspect that it's possibly PHP 5.4+ related, as the latest dev cleared up a different string to array conversion error. Notice: Array to string conversion in EntityAPIControllerExportable->applyConditions()

Edit: This issue seems to still exist. The latest Entity API dev had cleared up the other issue which was related to PHP 5.4+

I to am getting this message: Array to string conversion in features_get_orphans() (line 714

I have upgraded my MAMP which is now PHP 5.4.4 not sure if this helps.

@mpotter

I tried adding the code
foreach($modules[$module]->required_by as $module_name => $dependency){
$modules[$module]->required_by[$module_name] = $dependency['name'];
}

in the .module file around lines 700 but it didn't remove the error. Anyway to help us out on this ?

Thanks
K

Hi, I haven't had the chance to get to my old issue queue, and I'm also currently using PHP 5.3, so I'm not sure I can help.

Edit: I believe what it was is that I had the same issue when using PHP 5.4+. I just listed the other issue in #8 because it was 5.4+ related. All I can say for sure is that at some point updating Entity API helped me with an issue.

Now that the Commons Beta is out I plan to spend more time organizing my issues and helping out with the Commons issue queue.

Is this patch ready to go ? Error is def driving me a little bonkers :)

Updating Entity API did not fix the error.

@Kclarkson, I believe your answer can be found following this issue Array to string conversion error from line 625 of entity/includes/entity.controller.inc. I'm pretty sure you have to apply the patch yourself as it has not made it into any release yet. There are also others having issues with PHP5.4 and you might want to see what solutions worked for them.

Similar to another Features issue #1588596: Notice: Array to string conversion in features_export_prepare() (line 190 of features.export.inc) that was solved with a patch.

Notices exist using:

Drupal 7.19
PHP 5.4.9
features-7.x-2.0-beta1

I do not have the Entity API module installed so I doubt the patch at #12 (entity/includes/entity.controller.inc) is the solution.

StatusFileSize
new635 bytes

Patch at #4 worked for me against features-7.x-2.0-beta1

Re-uploading it.

StatusFileSize
new643 bytes

Here is a patch against 7.x-2.0-beta1 which solves the problem for me. This is a correctly-formatted version of the code from #1776738-4: Notice: Array to string conversion in features_get_orphans.

Thanks haxney, it seemed to solve the issue.
I hope the maintainer pulls this patch in soon.

Status:Needs review» Needs work

I haven't tested the patch but it is not compliant to coding standards and is not correctly indented.

  • Control statements such as foreach should have a space before the opening bracket.
  • Curly brackets should be preceded by a space as well.

StatusFileSize
new639 bytes

I only made the comment #15 patch code complaint.

Version:7.x-1.x-dev» 7.x-2.x-dev
Component:User interface» Code
Assigned:Unassigned» jlporter
Status:Needs work» Reviewed & tested by the community

#18 is a go

same here. 18 worked for me

#18 worked lovely. Let's get this committed asap :)

+1

rtbc

can we get this committed and rolled out?

NOTE - does this actually break anything or is it just a minor warning - IE can i still be using features just fine in php 5.4?

Status:Reviewed & tested by the community» Fixed

Committed to b84e900.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Hi.

Do you have a plan to incorporate this bugfix to the 1.x branch?

Version:7.x-2.x-dev» 7.x-1.x-dev
Issue summary:View changes
Status:Closed (fixed)» Patch (to be ported)

Bug is present in 1.x, so patch should be backported.

I don't believe anything is being backported to 1.x