Change to ResultWrapper indexing

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Change to ResultWrapper indexing

Gergo Tisza
Hi all,

In the past, iterating ResultWrapper (the object returned by
Database::select() and similar MediaWiki commands) resulted in 1-based
indexes (that is, foreach ( $rw as $i => $_ ) { echo "$i "; } would print 1
2 3 4...). From 1.34 (or since a few weeks ago, if you use the master
version), the indexing will be 0-based. Since there is no way to apply the
usual deprecation process to this type of change, it's being announced here
instead.
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l