mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-15 03:23:51 +00:00
Remainder of some more undefined variables
This commit is contained in:
parent
79502f80f8
commit
a28171f959
|
@ -204,6 +204,7 @@ class Gadget {
|
|||
* @return Mixed: Instance of Gadget class or false if $definition is invalid
|
||||
*/
|
||||
public static function newFromDefinition( $definition ) {
|
||||
$m = array();
|
||||
if ( !preg_match( '/^\*+ *([a-zA-Z](?:[-_:.\w\d ]*[a-zA-Z0-9])?)(\s*\[.*?\])?\s*((\|[^|]*)+)\s*$/', $definition, $m ) ) {
|
||||
return false;
|
||||
}
|
||||
|
@ -437,6 +438,7 @@ class Gadget {
|
|||
$section = '';
|
||||
|
||||
foreach ( $g as $line ) {
|
||||
$m = array();
|
||||
if ( preg_match( '/^==+ *([^*:\s|]+?)\s*==+\s*$/', $line, $m ) ) {
|
||||
$section = $m[1];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue