I'm really not a big expert in php, Drupal, or services module. However, the following code in comment_service.inc seems to be incorrect:
function comment_service_save($comment) {
// If the submitted comment does not contain a uid, set it to anonymous.
if (isset($comment->uid)) {
$uid = 0;
}
First, I believe '!' is missing in the condition as we're trying to check if $comment->uid is NOT defined.
Second, I would expect "$comment->uid = 0" within the if body as $uid is not used anywhere in this function.
I cannot test this as I ran into an access denied error on comment services calls (opened a separate support request). But just wanted to log this in case I'm right ...
Micah
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | comment-save.patch | 798 bytes | marcingy |
| #1 | comment-save.patch | 816 bytes | marcingy |
Comments
Comment #1
marcingy commentedThis patch takes the above report and creates a patch for it.
Comment #2
marcingy commentedwindows line ending fixed
Comment #3
gddCommitted, thanks