Closed (fixed)
Project:
Drupal Code Sniffer
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Apr 2012 at 12:36 UTC
Updated:
24 May 2012 at 09:10 UTC
in form.inc there are a few occurrences of:
$batch =& batch_get();
which get this error:
4597 | ERROR | An operator statement must be followed by a single space
Is this a real error?
see #1533096-21: Make includes directory, files starting with D-G pass Coder Review
Comments
Comment #1
klausiPersonally I think the ampersand belongs to the thing that is referenced, not to the assignment operator. But as we have no standard specified on this we also should not throw an error.
Fixed: http://drupalcode.org/project/drupalcs.git/commit/372a779
Please test.
Comment #2
sphism commentedKlausi I agree with you. Thanks for doing that. I assumed:
$foo =& $bar
was different to
$foo = &$bar
Since they are the same I would prefer to use the latter. Unless there is a difference I'm not aware of.
I guess the error for the former would be changed to something like ' no space between & and referenced variable '
Or something
Comment #3.0
(not verified) commentedUpdated issue summary.