I do not know what this module does, i have installed this module as dependence of configuration module
I got this errors the mae are repeated 30-40 times removed the duplicates
Notice: Trying to get property of non-object in xautoload_DrupalRegistrationPlan_PHP53->registerExtensionFilepaths() (line 35 of H:\wamp\www\sites\all\modules\xautoload\lib\DrupalRegistrationPlan\PHP53.php).
Notice: Trying to get property of non-object in xautoload_DrupalRegistrationPlan_PHP53->registerExtensionFilepaths() (line 36 of H:\wamp\www\sites\all\modules\xautoload\lib\DrupalRegistrationPlan\PHP53.php).
Notice: Trying to get property of non-object in xautoload_DrupalRegistrationPlan_PHP53->registerExtensionFilepaths() (line 36 of H:\wamp\www\sites\all\modules\xautoload\lib\DrupalRegistrationPlan\PHP53.php).
Notice: Trying to get property of non-object in xautoload_DrupalRegistrationPlan_PHP53->registerExtensionFilepaths() (line 37 of H:\wamp\www\sites\all\modules\xautoload\lib\DrupalRegistrationPlan\PHP53.php).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

donquixote’s picture

Interesting! Looks like you are on Windows..
Are you on the newest -dev version?

donquixote’s picture

I need to know which exact version you are on. Then I can help.

donquixote’s picture

Ok, I get an idea what could be the cause.

    foreach ($extensions as $info) {
      $extension_dir = dirname($info->filename);
      $prefix_maps[$info->type][$info->name] = $extension_dir . '/lib';
      $namespace_maps[$info->type]['Drupal\\' . $info->name] = $extension_dir . '/lib/Drupal/' . $info->name;
    }

We assume that $info is an object. But what if it is not?
Here is where the extensions are loaded from the db:

    $extension_filepaths = db_query("SELECT name, filename, type from {system} WHERE status = 1")->fetchAll();

On my machine, db_query(..)->fetchAll() returns an array of objects (stdClass).
But maybe this is not consistent across machines. Maybe it depends on a system setting?
http://php.net/manual/en/pdostatement.fetchall.php

Do you have a little bit of programming experience? Can you install devel module, and dpm() the $extensions array?

donquixote’s picture

Status: Active » Needs review
FileSize
693 bytes

http://www.php.net/manual/en/pdostatement.fetch.php
We need PDO::FETCH_OBJ ..

Can you try the patch?

kaizerking’s picture

Yes, Windows wamp server and,I am on latest dev version of xautoload,
I have applied the patch, is there any result expected in the form of PDO message?
I dont get any error messages now

kaizerking’s picture

Sorry: the error still exists

donquixote’s picture

xautoload is supposed to just silently do its job, and not show any warnings.

Can you look into the code and copy the lines that cause the error, and paste them here?
Also, could you do a dpm() on the $extensions array? I wanna see if there is anything in there that is not an object.

donquixote’s picture

I found a different possible reason for the issue. Can you try?

kaizerking’s picture

Hi thanks for this quick response, How ever I only require this as dependent to configuration management,at the moment i have set this aside, as configuration management only works with php 5.3.my hosting isn't agreeing to upgrade from 5.2 to php 5.3

donquixote’s picture

Status: Needs review » Fixed

As you opened the issue, it would be sweet if you could test it.

Anyway, there was some stuff that obviously needed to be fixed, so I committed and pushed the changes.
(mostly what is in the patch in #9, but some minor addition)

I consider this fixed, until someone steps up and proves me otherwise..

Status: Fixed » Closed (fixed)

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