mediawiki-extensions-Cite/includes
Alexander Mashin 3023f55605 T177134: Nulls passed to preg_match in Cite
Line 334 of Cite/includes/Cite.php contains two preg_match () calls. The subject lines for them are produced by Cite::refArgs () and are set to null or false when no name or follow attribute is provided in the <ref></ref> tag.

However, preg_match () is supposed to accept only strings as its subject, and the nowhere in the documentation it is said that it is nullable.

At least, in HHVM 3.12 this causes an exception.

The enclosed patch adds simple checks making sure that preg_match () is not called when $key or $follow are null or false.

Change-Id: I3e00d31d6bf216271ace7e851d88c68c4fd5ed00
2017-10-11 17:01:37 +00:00
..
ApiQueryReferences.php Improve some parameter docs 2017-10-06 21:22:30 +02:00
Cite.php T177134: Nulls passed to preg_match in Cite 2017-10-11 17:01:37 +00:00
CiteCSSFileModule.php doc: Bump copyright year notice, 'team' name 2017-04-20 16:50:43 +00:00
CiteDataModule.php Improve some parameter docs 2017-10-06 21:22:30 +02:00
CiteHooks.php Improve some parameter docs 2017-10-06 21:22:30 +02:00