When Classified Ads module is active, I get the message below. When I deactivate the module, I no longer get the message in the logs. To my untrained eye it looks like it could be a php4 vs php5 issue around how array merge works but that would require quite a few changes?
Invalid argument supplied for foreach() in /home/xxxxxxxx/public_html/includes/common.inc on line 1983.
array_merge() [function.array-merge]: Argument #2 is not an array in /home/xxxxxxxx/public_html/includes/common.inc on line 1952.
Drupal 5.7
Configuration file Protected
Cron maintenance tasks Last run 24 min 41 sec ago
You can run cron manually.
Database schema Up to date
File system Writable (public download method)
GD library bundled (2.0.34 compatible)
JQuery Update Installed correctly
The current installed version of JQuery is 1.1.2
MySQL database 5.0.51a
PHP 5.2.5
PHP register globals Disabled
Unicode library PHP Mbstring Extension
Web server Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.4mm
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | ed_classified-281747-1.patch | 506 bytes | milesgillham |
Comments
Comment #1
mydllurth commentedA similar error issues in our Drupal 6.4 installation when visiting recent log entries after Classified Ads is enabled.
The offending errors can be halted by changing line 784 of includes/common.inc (where log reports are tested for valid parameters).
This change eliminates all error messages as a result of other modules passing invalid watchdog messages. However completely this patch is for eliminating those error messages, the root of the problem is not with watchdog; our adjustment merely masks evidence of other modules passing inappropriate parameters according to the documented Drupal API.
http://api.drupal.org/api/function/watchdog
_edi_wd() is inconsistent for the subsequent watchdog() function call.
As the two code sections above show, the array parameter is missing. Skipping the $variables parameter is not the same as passing an empty array().
Comment #2
gauravkumar87 commentedI've faced the same issue after enabling the classifieds module.
Comment #3
mcurry commentedI'll work on a fix. Thanks for the background info.
Comment #4
jeweller commenteded_classified_utils.inc
#357
+ watchdog(EDI_CLASSIFIED_MODULE_NAME, $message, NULL, $severity, $link);
- watchdog(EDI_CLASSIFIED_MODULE_NAME, $message, $severity, $link);
do not know, faithfully, but I have sent NULL in parameter $variables = array() - message disappeared
Comment #5
milesgillham commentedAlright, this would appear to be an answer.
Comment #6
milesgillham commentedPatch has been applied to development branch.