Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/338737 )

Change subject: Add PHP error/warning/notice
......................................................................

Add PHP error/warning/notice

Change-Id: I1b3fb4d4bdf5555a61a26532e0e600405f295cfc
---
M Buggy.hooks.php
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Buggy 
refs/changes/37/338737/1

diff --git a/Buggy.hooks.php b/Buggy.hooks.php
index 9bc35d7..7df55b8 100644
--- a/Buggy.hooks.php
+++ b/Buggy.hooks.php
@@ -31,6 +31,15 @@
                                                throw new MWException( 'Buggy 
test exception', 123 );
                                        case 'missing-class':
                                                new Buggy_NoSuchClass();
+                                       case 'php-error':
+                                               require( 'nosuchfile.php' );
+                                               break;
+                                       case 'php-warning':
+                                               foreach ( null as $_ );
+                                               break;
+                                       case 'php-notice':
+                                               $_ = $doesNotExist;
+                                               break;
                                        case 'sql':
                                                $dbr = wfGetDB( DB_SLAVE );
                                                $dbr->query( 'THIS IS AN 
ERROR', __METHOD__ );

-- 
To view, visit https://gerrit.wikimedia.org/r/338737
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b3fb4d4bdf5555a61a26532e0e600405f295cfc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Buggy
Gerrit-Branch: master
Gerrit-Owner: GergÅ‘ Tisza <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to