Hello,
I recently got this error with PHP 5.3 and Pressflow.
Warning: preg_grep() expects parameter 2 to be array, null given in _authcache_get_http_header() (line 345 of /var/www/madfanboy.com/site/sites/all/modules/authcache/authcache.helpers.inc).
Any fix or suggestion?
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | authcache.helpers.inc_.patch | 596 bytes | Joshua Brunner |
| #3 | authcache_1156520_2.patch | 566 bytes | maxmendez |
Comments
Comment #1
superfedya commentedAnother error:
Warning: Parameter 2 to authcache_user() expected to be a reference, value given in module_invoke_all() (line 483 of /var/www/madfanboy.com/site/includes/module.inc).
100% sure it's PHP 5.3 compatibility issue.
Comment #2
maxmendez commentedI think the line 346 should be replaced by this :
$headers = preg_grep($regex, explode("\n", drupal_get_header()));
change:
drupal_set_header() -> drupal_get_header()
Comment #3
maxmendez commentedMy solution
Comment #4
Joshua Brunner commentedauthcache_1156520_2.patch work's only with pressflow installed. You should use: drupal_get_headers
Comment #5
demon326 commentedThe last patch fixes the errors, but it seems that the stops authcache from caching with a pressflow base.. pressflow debug spits out the following:
"Authcache prevented cachingNO_CACHE: "Page not cached."
"INFO: "Authcache.info JSON is empty!""
Comment #6
mattwmc commentedA bit old, but I still use pressflow and just installed Authcache.
The patches didn't work until I added '@' in front of preg_grep.
Not sure (not a php guy), but the problem went away with either the set or get header being used.
Edit: as mentioned above, if using pressflow, use the get_header:
Comment #7
kenorb commentedComment #8
kenorb commentedClosed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.