r53884 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53883‎ | r53884 | r53885 >
Date:17:38, 28 July 2009
Author:dale
Status:resolved (Comments)
Tags:
Comment:
checking for session_id() was preventing updates (just put a @ infront to ignore E_NOTICE for php 4.3.3 and greater )
Modified paths:
  • /trunk/phase3/includes/HttpFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HttpFunctions.php
@@ -556,7 +556,7 @@
557557 public function update_session_progress(){
558558 $status = Status::newGood();
559559 // start the session (if nessesary)
560 - if( session_id() == '' && session_start() === false){
 560+ if( @session_start() === false){
561561 wfDebug( __METHOD__ . ' could not start session' );
562562 exit( 0 );
563563 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r55301Followup r53884, use wfSuppressWarnings/wfRestoreWarnings instead of @demon01:55, 19 August 2009

Comments

#Comment by 😂 (talk | contribs)   19:07, 29 July 2009

I know Tim's brought up issues with using error suppression elsewhere. Might want to find a way to work around this without using @?

#Comment by Mdale (talk | contribs)   00:43, 30 July 2009

hmm I don't see a way around it... This change was made because the session_id() == did not work to get a session instance to write to after the session_close.

I could just leave it session_start() without the @ which seems to do oky since its running on the command line and the E_NOTICE stuff does not get written out to the user... but it probably being written to some log file somewhere. I am fine with either way.

Status & tagging log