bunq / sdk_php

PHP SDK for bunq API
MIT License
84 stars 54 forks source link

Fatal error in the interactive installer when no allowed IP is given #79

Closed mbernson closed 6 years ago

mbernson commented 6 years ago

Steps to reproduce:

  1. Run vendor/bin/bunq-install
  2. Enter no value for the allowed IP, just hit return

What should happen:

  1. The configuration is generated

What happens:

  1. The script gives a fatal error

Logs

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to bunq\Util\InstallationUtil::formatIps() must be of the type string, null given, called in /Users/mbernson/bunqtest/vendor/bunq/sdk_php/src/Util/InstallationUtil.php on line 88 and defined in /Users/mbernson/bunqtest/vendor/bunq/sdk_php/src/Util/InstallationUtil.php:193
Stack trace:
#0 /Users/mbernson/bunqtest/vendor/bunq/sdk_php/src/Util/InstallationUtil.php(88): bunq\Util\InstallationUtil::formatIps(NULL)
#1 /Users/mbernson/bunqtest/vendor/bunq/sdk_php/bin/bunq-install(16): bunq\Util\InstallationUtil::interactiveInstall()
#2 {main}
  thrown in /Users/mbernson/bunqtest/vendor/bunq/sdk_php/src/Util/InstallationUtil.php on line 193

Fatal error: Uncaught TypeError: Argument 1 passed to bunq\Util\InstallationUtil::formatIps() must be of the type string, null given, called in /Users/mbernson/bunqtest/vendor/bunq/sdk_php/src/Util/InstallationUtil.php on line 88 and defined in /Users/mbernson/bunqtest/vendor/bunq/sdk_php/src/Util/InstallationUtil.php on line 193

TypeError: Argument 1 passed to bunq\Util\InstallationUtil::formatIps() must be of the type string, null given, called in /Users/mbernson/bunqtest/vendor/bunq/sdk_php/src/Util/InstallationUtil.php on line 88 in /Users/mbernson/bunqtest/vendor/bunq/sdk_php/src/Util/InstallationUtil.php on line 193

Call Stack:
    0.0003     354664   1. {main}() /Users/mbernson/bunqtest/vendor/bunq/sdk_php/bin/bunq-install:0
    0.0044     677128   2. bunq\Util\InstallationUtil::interactiveInstall() /Users/mbernson/bunqtest/vendor/bunq/sdk_php/bin/bunq-install:16
    9.4677    1736472   3. bunq\Util\InstallationUtil::formatIps() /Users/mbernson/bunqtest/vendor/bunq/sdk_php/src/Util/InstallationUtil.php:88

Extra info:

See PR #78

OGKevin commented 6 years ago

Closing this issue as bunq/sdk_php#78 has been merged.

@mbernson thanks for still creating the issue :thumbsup:.