[Bug 27360] PHP Only variables should be passed by reference error when running maintenance script SMW_refreshdata.php

2012-11-01 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=27360

Markus Krötzsch mar...@semantic-mediawiki.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #9 from Markus Krötzsch mar...@semantic-mediawiki.org 2012-11-01 
18:03:57 UTC ---
I have just checked our code for all uses of reset(), array_shift() and
array_pop(). I think it is safe to close this bug now.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 27360] PHP Only variables should be passed by reference error when running maintenance script SMW_refreshdata.php

2011-02-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=27360

--- Comment #6 from Markus Krötzsch mar...@semantic-mediawiki.org 2011-02-14 
09:43:18 UTC ---
Our code still has things like

$dv = reset( $data-getPropertyValues( $property ) );

which should cause this message to appear as well (or does it not?). If this is
the case, the bug should remain open until we rewrote all such uses to
something like

$values = $data-getPropertyValues( $property );
$dv = reset( $values );

I wonder if there isn't a more direct way of getting the first/last element of
a PHP array without assigning it to a variable first.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 27360] PHP Only variables should be passed by reference error when running maintenance script SMW_refreshdata.php

2011-02-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=27360

--- Comment #7 from Jeroen De Dauw jeroen_ded...@yahoo.com 2011-02-14 
15:24:19 UTC ---
Indeed there is: 

$dv = array_shift( $data-getPropertyValues( $property ) );

For the last element you can use array_pop()

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 27360] PHP Only variables should be passed by reference error when running maintenance script SMW_refreshdata.php

2011-02-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=27360

--- Comment #8 from Markus Krötzsch mar...@semantic-mediawiki.org 2011-02-14 
16:06:26 UTC ---
As I read the documentation [1], array_shift also assumes a call-by-ref
parameter, so should yield the same message.

[1] http://php.net/manual/en/function.array-shift.php

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 27360] PHP Only variables should be passed by reference error when running maintenance script SMW_refreshdata.php

2011-02-13 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=27360

--- Comment #3 from Jeroen De Dauw jeroen_ded...@yahoo.com 2011-02-13 
13:57:40 UTC ---
This looks like an SMW+ issue really. The warning is probably coming from
automaticsemanticforms making an incorrect call to the SMW SQL store. 

In any case, whet version of SMW are you using? Did it came bundled with SMW+
(and have a bunch of patches with it)? If so, you should report this to
Ontoprise.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 27360] PHP Only variables should be passed by reference error when running maintenance script SMW_refreshdata.php

2011-02-13 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=27360

--- Comment #4 from Gijs van Haastrecht subs@gmail.com 2011-02-13 
21:02:25 UTC ---
Thanks for answering.
I got the latest version of both SMW (1.5.5)and SMW+ (1.5.2).
I thought it might be SMW+ wrongly calling SMW methods as well.
Will report it to them.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 27360] PHP Only variables should be passed by reference error when running maintenance script SMW_refreshdata.php

2011-02-13 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=27360

--- Comment #5 from Jeroen De Dauw jeroen_ded...@yahoo.com 2011-02-13 
21:05:20 UTC ---
Markus: Unless you disagree with this being SMW+s doing it wrong, this can be
marked as invalid.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 27360] PHP Only variables should be passed by reference error when running maintenance script SMW_refreshdata.php

2011-02-12 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=27360

--- Comment #1 from Gijs van Haastrecht subs@gmail.com 2011-02-12 
12:34:11 UTC ---
It happened after installing the automaticsemanticforms of SMW+.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 27360] PHP Only variables should be passed by reference error when running maintenance script SMW_refreshdata.php

2011-02-12 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=27360

Markus Krötzsch mar...@semantic-mediawiki.org changed:

   What|Removed |Added

   Priority|Normal  |Low
 Status|NEW |ASSIGNED
   Platform|HP  |All
 OS/Version|Windows 7   |All
   Severity|enhancement |minor

--- Comment #2 from Markus Krötzsch mar...@semantic-mediawiki.org 2011-02-12 
15:38:32 UTC ---
This is not an error but merely a notice that points to a use of PHP functions
that is not completely conforming to the specification. Production sites should
be configured to not show these messages at all (php.ini defines what is shown,
do not enable STRICT and NOTICE unless you are a developer). 

In your case, the reason for the message might be a number of uses of reset()
on return values of functions. We will be eliminating these at some point. A
number of calls to the function end() have recently been eliminated in SVN.
Neither cause problems in practice.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l