ApiMain: Always create a new printer in getPrinterByName()
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 19 Jul 2018 13:24:48 +0000 (09:24 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Thu, 19 Jul 2018 14:45:28 +0000 (10:45 -0400)
commit78955203c3c1f810cae04c7c92790c99c1de9e7f
treecb6761dac8c876dfd415de67e62f2e4aad8e625b
parent1fb12414dba64fbe78bfd63da696a4c0fa4c2c24
ApiMain: Always create a new printer in getPrinterByName()

ApiMain already caches the printer in ->mPrinter, so if
getPrinterByName() is being called more than once that's because we
really want a new printer instance, without any cached errors or other
behavior that results from reusing the same instance.

Bug: T199949
Change-Id: I779cbbaa8aab9b049a8eed732416edd828121ec4
includes/api/ApiMain.php
tests/phpunit/includes/api/ApiMainTest.php