Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There are two errors in the _authcache_node_history()
function:
- There is no check that the passed
$nid
parameter is valid before passing it to functions which assume its validity. - The
node_tag_new()
function is called with a$nid
parameter instead of a$node
parameter.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1811820-authcache_node_history-1.patch | 971 bytes | pillarsdotnet |
Comments
Comment #1
pillarsdotnet CreditAttribution: pillarsdotnet commentedAttached patch fixes both problems.
Comment #2
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedi get this error sometimes and the page goes white.
PHP Parse error: syntax error, unexpected '=', expecting ')' in /authcache/ajax/authcache.php on line 138
Comment #3
simg CreditAttribution: simg commented@ SocialNicheGuru: do you have any reason to think your error is related to this particular issue ?
Comment #4
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedyep. the line of code was introduced by this patch
if (empty($node = node_load($nid))) {
I just did:
$node = node_load($nid);
if((empty($node) || ($node === NULL))
Comment #5
simg CreditAttribution: simg commentedthanks guys, this issue now fixed in dev and 7.x-1.0