Hello, with the Amazon Store module enable, I've got these warnings below on my /admin/build/translate page.

warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/jdscreat/www/includes/bootstrap.inc on line 777.

Comments

junro’s picture

rfay’s picture

Status: Active » Needs review
StatusFileSize
new2.8 KB

Yes, this is due to amazon_store implementing hook_locale() by accident.

Please try out this patch.

junro’s picture

StatusFileSize
new66.12 KB

The patch doesn't seem to work.

See the screenshot of it in attached file.

rfay’s picture

The patch needs to be applied in the amazon_store directory, and it needs to be against the dev version of the module. Could you try that? And if you have trouble, attach one or two of the .rej files.

junro’s picture

I did it and I'm using the dev. version.

I give you the .rej files:

amazon_store.locale.ca.inc.rej:

***************
*** 1,6 ****
  <?php
  
- function amazon_store_locale() {
  
  
    $locale = array(
--- 1,6 ----
  <?php
  
+ function _amazon_store_locale() {
  
  
    $locale = array(

amazon_store.locale.us.inc.rej:

***************
*** 1,6 ****
  <?php
  
- function amazon_store_locale() {
  
  $locale = array( 'US' => array(
    'All' => array('friendly_name' => t('All'),
--- 1,6 ----
  <?php
  
+ function _amazon_store_locale() {
  
  $locale = array( 'US' => array(
    'All' => array('friendly_name' => t('All'),

amazon_store.locale.fr.inc.rej:

***************
*** 1,7 ****
  <?php
  
  
- function amazon_store_locale() {
  
    $locale = array('FR' => array(
        'All' => array('friendly_name' => t('All'),
--- 1,7 ----
  <?php
  
  
+ function _amazon_store_locale() {
  
    $locale = array('FR' => array(
        'All' => array('friendly_name' => t('All'),

If you need more rej files, let me know ^^

rfay’s picture

Well, your .rej files don't show anything wrong.

Is your patching technique one that you're confident in, that you've used before?

(Is it cygwin, using patch -p0

This actually will solve the problem. You can apply the changes to the individual files by hand if you want. Just change all amazon_store_locale to _amazon_store_locale. That's all the patch does.

junro’s picture

Hum I certainly make a mistake somewhere. I was patching with another methode before. Only use it once this one.

I take care of it right know.

junro’s picture

Ok, I don't know why I can't apply this patch... It's not very difficult.

I apply the patch manually and the problem is solve.

Thanks :)

rfay’s picture

Status: Needs review » Fixed

Committed to HEAD: http://drupal.org/cvs?commit=350242

Thanks!

Status: Fixed » Closed (fixed)

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