Page MenuHomePhabricator

Use MediaWiki\SuppressWarnings around trigger_error('') instead @trigger_error('')
Open, Needs TriagePublic

Description

The @ sign doesn't work with scream while \MediaWiki\suppressWarnings() also quiets the scream.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 2 2018, 10:12 PM

Change 423576 had a related patch set uploaded (by MarkAHershberger; owner: MarkAHershberger):
[mediawiki/core@master] Use MediaWiki\SuppressWarnings around trigger_error('') instead @

https://gerrit.wikimedia.org/r/423576

Change 423579 had a related patch set uploaded (by MarkAHershberger; owner: MarkAHershberger):
[mediawiki/extensions/Scribunto@master] Use MediaWiki\SuppressWarnings around trigger_error('') instead @

https://gerrit.wikimedia.org/r/423579

Anomie added a subscriber: Anomie.Apr 3 2018, 12:25 AM

Why should we care about some random pecl extension that's designed to break things?

I say let's wait until T176370 is done so we can change it to error_clear_last() instead of making the code even more complicated

Why should we care about some random pecl extension that's designed to break things?

I agree. If this is just about scream, it isn't worth it.

However, use of @ to hide errors is deprecated and \MediaWiki\suppressWarnings is preferred. The preferred method also happens to mollify scream.

Change 423579 merged by jenkins-bot:
[mediawiki/extensions/Scribunto@master] Use MediaWiki\SuppressWarnings around trigger_error('') instead @

https://gerrit.wikimedia.org/r/423579

Change 425336 had a related patch set uploaded (by MarkAHershberger; owner: MarkAHershberger):
[mediawiki/core@REL1_27] Use MediaWiki\SuppressWarnings around trigger_error('') instead @

https://gerrit.wikimedia.org/r/425336

Change 425424 had a related patch set uploaded (by MarkAHershberger; owner: MarkAHershberger):
[mediawiki/extensions/Scribunto@REL1_27] Use MediaWiki\SuppressWarnings around trigger_error('') instead @

https://gerrit.wikimedia.org/r/425424

Change 425424 merged by jenkins-bot:
[mediawiki/extensions/Scribunto@REL1_27] Use MediaWiki\SuppressWarnings around trigger_error('') instead @

https://gerrit.wikimedia.org/r/425424

Change 427180 had a related patch set uploaded (by MarkAHershberger; owner: MarkAHershberger):
[mediawiki/core@REL1_29] Use MediaWiki\SuppressWarnings around trigger_error('') instead @

https://gerrit.wikimedia.org/r/427180

Change 427184 had a related patch set uploaded (by MarkAHershberger; owner: MarkAHershberger):
[mediawiki/core@REL1_30] Use MediaWiki\SuppressWarnings around trigger_error('') instead @

https://gerrit.wikimedia.org/r/427184

Change 427184 merged by jenkins-bot:
[mediawiki/core@REL1_30] Use MediaWiki\SuppressWarnings around trigger_error('') instead @

https://gerrit.wikimedia.org/r/427184

Change 427180 merged by jenkins-bot:
[mediawiki/core@REL1_29] Use MediaWiki\SuppressWarnings around trigger_error('') instead @

https://gerrit.wikimedia.org/r/427180

Change 425336 merged by jenkins-bot:
[mediawiki/core@REL1_27] Use MediaWiki\SuppressWarnings around trigger_error('') instead @

https://gerrit.wikimedia.org/r/425336

Change 423576 merged by D3r1ck01:
[mediawiki/core@master] Use MediaWiki\SuppressWarnings around trigger_error('') instead @

https://gerrit.wikimedia.org/r/423576