Using you module with PHP 5.3, I got some PHP warnings (when running update.php, at the result screen). I think some of these errors might reveal underlaying errors.
I don't have any bugs myself, but you should do a quick review of these:
# Notice: Undefined variable: context in i18nstrings_remove() (line 1208 of /var/www/drupal-installation-profiles/testing/modules/contrib/i18n/i18nstrings/i18nstrings.module).
# Notice: Trying to get property of non-object in i18nstrings_location() (line 811 of /var/www/drupal-installation-profiles/testing/modules/contrib/i18n/i18nstrings/i18nstrings.module).
# Notice: Trying to get property of non-object in i18nstrings_location() (line 813 of /var/www/drupal-installation-profiles/testing/modules/contrib/i18n/i18nstrings/i18nstrings.module).
# Notice: Trying to get property of non-object in i18nstrings_location() (line 813 of /var/www/drupal-installation-profiles/testing/modules/contrib/i18n/i18nstrings/i18nstrings.module).
# Notice: Trying to get property of non-object in i18nstrings_params() (line 784 of /var/www/drupal-installation-profiles/testing/modules/contrib/i18n/i18nstrings/i18nstrings.module).
I'm going to make a quick and dirty patch to shut up the errors, but doing too much isset() or empty() tests won't make debuging easier.
Comments
Comment #1
pounardI see at least one or two of theses which seems to be OK.
i18nstrings.module, line 815 is:
You might want to write, in order to avoid such PHP warnings (for 5.3 only):
This should still give some warnings, because if $context is not an object, then PHP will warn about a property access attempt on a non existing object.
It seems that in the i18ntrings_location() function, you never test if the $context parameter is empty or not, but it seems that in the use case I'm currently dealing with, the method attempt to run with an non object variable (it also might be a wrong usage of this module by another third party module).
Comment #2
LSU_JBob commentedI'm getting a whole slew of these errors whenever I save modules or run update.php
* Notice: Undefined variable: context in i18nstrings_remove() (line 1208 of /Developer/testproject/docroot/sites/all/modules/i18n/i18nstrings/i18nstrings.module).
* Notice: Trying to get property of non-object in i18nstrings_location() (line 811 of /Developer/testproject/docroot/sites/all/modules/i18n/i18nstrings/i18nstrings.module).
* Notice: Trying to get property of non-object in i18nstrings_location() (line 813 of /Developer/testproject/docroot/sites/all/modules/i18n/i18nstrings/i18nstrings.module).
* Notice: Trying to get property of non-object in i18nstrings_location() (line 813 of /Developer/testproject/docroot/sites/all/modules/i18n/i18nstrings/i18nstrings.module).
* Notice: Trying to get property of non-object in i18nstrings_params() (line 784 of /Developer/testproject/docroot/sites/all/modules/i18n/i18nstrings/i18nstrings.module).
* Notice: Undefined variable: context in i18nstrings_remove() (line 1208 of /Developer/testproject/docroot/sites/all/modules/i18n/i18nstrings/i18nstrings.module).
* Notice: Trying to get property of non-object in i18nstrings_location() (line 811 of /Developer/testproject/docroot/sites/all/modules/i18n/i18nstrings/i18nstrings.module).
* Notice: Trying to get property of non-object in i18nstrings_location() (line 813 of /Developer/testproject/docroot/sites/all/modules/i18n/i18nstrings/i18nstrings.module).
* Notice: Trying to get property of non-object in i18nstrings_location() (line 813 of /Developer/testproject/docroot/sites/all/modules/i18n/i18nstrings/i18nstrings.module).
* Notice: Trying to get property of non-object in i18nstrings_params() (line 784 of /Developer/testproject/docroot/sites/all/modules/i18n/i18nstrings/i18nstrings.module).
* Notice: Undefined variable: context in i18nstrings_remove() (line 1208 of /Developer/testproject/docroot/sites/all/modules/i18n/i18nstrings/i18nstrings.module).
* Notice: Trying to get property of non-object in i18nstrings_location() (line 811 of /Developer/testproject/docroot/sites/all/modules/i18n/i18nstrings/i18nstrings.module).
* Notice: Trying to get property of non-object in i18nstrings_location() (line 813 of /Developer/testproject/docroot/sites/all/modules/i18n/i18nstrings/i18nstrings.module).
* Notice: Trying to get property of non-object in i18nstrings_location() (line 813 of /Developer/testproject/docroot/sites/all/modules/i18n/i18nstrings/i18nstrings.module).
* Notice: Trying to get property of non-object in i18nstrings_params() (line 784 of /Developer/testproject/docroot/sites/all/modules/i18n/i18nstrings/i18nstrings.module).
* Notice: Undefined index: configurable in actions_synchronize() (line 323 of /Developer/testproject/docroot/includes/actions.inc).
I tried your small fix pounard but to no avail. How can I stop these notices from coming up whenever I save modules or run update.php?
Comment #3
LSU_JBob commentedHere's a patch I made to at least get rid of these annoying errors. Don't know how solid it is.
Comment #4
damienmckennaFYI I get this error with drush 4.0-dev on PHP 5.2.13 when I enable a module.
Comment #5
mikeytown2 commentedpatch in #3 is for the context module & it appears that has been fix in it.
Here is a patch that fixes the error on update.php for us. Also fixes some white-space formatting issues.
Comment #6
jose reyero commentedCommitted, thanks.
Comment #8
Aleksey Zubko commentedHere is a patch that fixes the notice on node/add page.
Comment #9
joseph.olstad