[PR #55] [CLOSED] If port is not set on server, it would show a PHP warning #247

Closed
opened 2026-03-07 20:42:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/DBDiff/DBDiff/pull/55
Author: @berlinger-peussen
Created: 6/14/2017
Status: Closed

Base: masterHead: bugfix/fix_undefined_index_warning


📝 Commits (1)

  • d289841 If port is not set on server, it would show a warning (error_reporting E_ALL)

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 src/Params/CLIGetter.php (+2 -2)

📄 Description

When running the command like this:

dbdiff --type=schema --server1=user1:pass1@server1.com ...

It would throw a PHP warning:

PHP Notice: Undefined offset: 1 in /var/www/DBDiff/src/Params/CLIGetter.php on line 60
PHP Stack trace:
PHP 1. {main}() /var/www/DBDiff/dbdiff:0
PHP 2. DBDiff\DBDiff->run() /var/www/DBDiff/dbdiff:8
PHP 3. DBDiff\Params\ParamsFactory::get() /var/www/DBDiff/src/DBDiff.php:19
PHP 4. DBDiff\Params\CLIGetter->getParams() /var/www/DBDiff/src/Params/ParamsFactory.php:13
PHP 5. DBDiff\Params\CLIGetter->parseServer() /var/www/DBDiff/src/Params/CLIGetter.php:31

Notice: Undefined offset: 1 in /var/www/DBDiff/src/Params/CLIGetter.php on line 60

Call Stack:
0.0004 221848 1. {main}() /var/www/DBDiff/dbdiff:0
0.0642 884144 2. DBDiff\DBDiff->run() /var/www/DBDiff/dbdiff:8
0.0662 892920 3. DBDiff\Params\ParamsFactory::get() /var/www/DBDiff/src/DBDiff.php:19
0.0702 930520 4. DBDiff\Params\CLIGetter->getParams() /var/www/DBDiff/src/Params/ParamsFactory.php:13
0.1079 1202096 5. DBDiff\Params\CLIGetter->parseServer() /var/www/DBDiff/src/Params/CLIGetter.php:31


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/DBDiff/DBDiff/pull/55 **Author:** [@berlinger-peussen](https://github.com/berlinger-peussen) **Created:** 6/14/2017 **Status:** ❌ Closed **Base:** `master` ← **Head:** `bugfix/fix_undefined_index_warning` --- ### 📝 Commits (1) - [`d289841`](https://github.com/DBDiff/DBDiff/commit/d289841700928b7fc1c38bbc9cd6cde2eea32d47) If port is not set on server, it would show a warning (error_reporting E_ALL) ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/Params/CLIGetter.php` (+2 -2) </details> ### 📄 Description When running the command like this: ``` dbdiff --type=schema --server1=user1:pass1@server1.com ... ``` It would throw a PHP warning: PHP Notice: Undefined offset: 1 in /var/www/DBDiff/src/Params/CLIGetter.php on line 60 PHP Stack trace: PHP 1. {main}() /var/www/DBDiff/dbdiff:0 PHP 2. DBDiff\DBDiff->run() /var/www/DBDiff/dbdiff:8 PHP 3. DBDiff\Params\ParamsFactory::get() /var/www/DBDiff/src/DBDiff.php:19 PHP 4. DBDiff\Params\CLIGetter->getParams() /var/www/DBDiff/src/Params/ParamsFactory.php:13 PHP 5. DBDiff\Params\CLIGetter->parseServer() /var/www/DBDiff/src/Params/CLIGetter.php:31 Notice: Undefined offset: 1 in /var/www/DBDiff/src/Params/CLIGetter.php on line 60 Call Stack: 0.0004 221848 1. {main}() /var/www/DBDiff/dbdiff:0 0.0642 884144 2. DBDiff\DBDiff->run() /var/www/DBDiff/dbdiff:8 0.0662 892920 3. DBDiff\Params\ParamsFactory::get() /var/www/DBDiff/src/DBDiff.php:19 0.0702 930520 4. DBDiff\Params\CLIGetter->getParams() /var/www/DBDiff/src/Params/ParamsFactory.php:13 0.1079 1202096 5. DBDiff\Params\CLIGetter->parseServer() /var/www/DBDiff/src/Params/CLIGetter.php:31 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-07 20:42:29 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/DBDiff#247
No description provided.