Last modified: 2005-01-11 00:07:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T3205, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 1205 - Article saving impossible in PHP 5.1
Article saving impossible in PHP 5.1
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Normal major with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-26 22:29 UTC by Robbert Broersma
Modified: 2005-01-11 00:07 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Robbert Broersma 2004-12-26 22:29:30 UTC
When you save the page there is reported a '''FATAL error''', and the processing
''completely shuts down'':

<pre>Fatal error: [] operator not supported for strings in
/www/mediawiki/includes/Article.php on line 534</pre>

It concerns the function 'getSelectOptions', and if I understand the code
correctly that functio can take either an array or a string as argument. Since
there is no type checking an error is produced because the string is manipulated
as if it were an array. The solution is quite simple: check wheter the argument
is an array or a string.

Concretely, it means that line (533):
<pre>if ( $options ) {</pre>
Has to be changed in this.
<pre>if ( is_array( $options ) ) {</pre>

Now I can use my Wiki again!
Comment 1 JeLuF 2005-01-11 00:07:35 UTC
Fixed in CVS HEAD and CVS REL1_4.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links