mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/12007] Default last_result to 0 instead of false
PostgreSQL does not map null/false to 0 and thus this variable causes an error. PHPBB3-12007
This commit is contained in:
@@ -375,7 +375,7 @@ class migrator
|
|||||||
|
|
||||||
foreach ($steps as $step_identifier => $step)
|
foreach ($steps as $step_identifier => $step)
|
||||||
{
|
{
|
||||||
$last_result = false;
|
$last_result = 0;
|
||||||
if ($state)
|
if ($state)
|
||||||
{
|
{
|
||||||
// Continue until we reach the step that matches the last step called
|
// Continue until we reach the step that matches the last step called
|
||||||
@@ -436,7 +436,7 @@ class migrator
|
|||||||
* @param bool $reverse False to install, True to attempt uninstallation by reversing the call
|
* @param bool $reverse False to install, True to attempt uninstallation by reversing the call
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
protected function run_step($step, $last_result = false, $reverse = false)
|
protected function run_step($step, $last_result = 0, $reverse = false)
|
||||||
{
|
{
|
||||||
$callable_and_parameters = $this->get_callable_from_step($step, $last_result, $reverse);
|
$callable_and_parameters = $this->get_callable_from_step($step, $last_result, $reverse);
|
||||||
|
|
||||||
@@ -459,7 +459,7 @@ class migrator
|
|||||||
* @param bool $reverse False to install, True to attempt uninstallation by reversing the call
|
* @param bool $reverse False to install, True to attempt uninstallation by reversing the call
|
||||||
* @return array Array with parameters for call_user_func_array(), 0 is the callable, 1 is parameters
|
* @return array Array with parameters for call_user_func_array(), 0 is the callable, 1 is parameters
|
||||||
*/
|
*/
|
||||||
protected function get_callable_from_step(array $step, $last_result = false, $reverse = false)
|
protected function get_callable_from_step(array $step, $last_result = 0, $reverse = false)
|
||||||
{
|
{
|
||||||
$type = $step[0];
|
$type = $step[0];
|
||||||
$parameters = $step[1];
|
$parameters = $step[1];
|
||||||
|
Reference in New Issue
Block a user