Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing default values caused errorHandlerIgnore to fail under PHP 8.0 #63

Merged
merged 1 commit into from
Mar 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/Zend/FilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public function testUsageOfOldStaticFactory()
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccurred = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Form/Element/FileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ private function _convertIniToInteger($setting)
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccurred = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/LocaleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ public function testEachDataFileShouldPresentAsLocaleData()
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccurred = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Translate/Adapter/ArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public function testLoadingFilesIntoCacheAfterwards()
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccurred = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Translate/Adapter/CsvTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public function testSpecialChars()
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccurred = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Translate/Adapter/GettextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public function testPluralToSingular()
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccurred = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Translate/Adapter/IniTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public function testOptionLocaleFilename()
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccurred = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Translate/Adapter/QtTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public function testIsoEncoding()
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccurred = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Translate/Adapter/TbxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public function testWithoutEncoding()
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccurred = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Translate/Adapter/TmxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public function testUseId()
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccurred = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Translate/Adapter/XliffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function testIsoEncoding()
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccurred = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Translate/Adapter/XmlTmTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public function testWithoutEncoding()
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext= array())
{
$this->_errorOccurred = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/TranslateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ public function testSettingLogPriorityForLog()
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccured = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Validate/AbstractTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public function testMaximumErrorMessageLength()
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccurred = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Validate/CcnumTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function testGetMessages()
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccured = true;
}
Expand Down
8 changes: 6 additions & 2 deletions tests/Zend/Validate/DateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ public function testLocaleContructor()
*/
public function testNonStringValidation()
{
$this->assertFalse($this->_validator->isValid(array(1 => 1)));
try {
$this->assertFalse($this->_validator->isValid(array(1 => 1)));
} catch (Error $e) {
$this->assertTrue($e instanceof TypeError);
}
}

/**
Expand Down Expand Up @@ -251,7 +255,7 @@ public function testArrayVerification()
* @return void
* @group ZF-2789
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccurred = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/ValidateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function handleNotFoundError($errnum, $errstr)
* @param array $errcontext
* @return void
*/
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext)
public function errorHandlerIgnore($errno, $errstr, $errfile, $errline, array $errcontext = array())
{
$this->_errorOccurred = true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/View/Helper/Navigation/NavigationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public function testSetDefaultRoleThrowsExceptionWhenGivenAnArbitraryObject()
}

private $_errorMessage;
public function toStringErrorHandler($code, $msg, $file, $line, array $c)
public function toStringErrorHandler($code, $msg, $file, $line, array $c = array())
{
$this->_errorMessage = $msg;
}
Expand Down