Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

sbuerk
Copy link
Collaborator

@sbuerk sbuerk commented Nov 28, 2024

Using the typo3DatabasePort environment variable to
define the database server port string-casts the value
to an string which is not compatible with the mysqli
method mysqli::real_connect() and fails with:

TypeError: mysqli::real_connect(): Argument #5 ($port)
must be of type ?int, string given

This change casts the database port to an integer in case
a port is provided to avoid PHP TypeError when passing to
mysqli::real_connect() to align with ConnectionPool,
which is not used to create the database for the functional
test instance.

Resolves: #631
Releases: main, 8

Using the `typo3DatabasePort` environment variable to
define the database server port string-casts the value
to an string which is not compatible with the mysqli
method `mysqli::real_connect()` and fails with:

  TypeError: mysqli::real_connect(): Argument #5 ($port)
  must be of type ?int, string given

This change casts the database port to an integer in case
a port is provided to avoid PHP TypeError when passing to
`mysqli::real_connect()` to align with `ConnectionPool`,
which is not used to create the database for the functional
test instance.

Resolves: #631
Releases: main, 8
@sbuerk sbuerk merged commit 18329b0 into main Nov 28, 2024
6 checks passed
@sbuerk sbuerk deleted the main-issue-631 branch November 28, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type error on executing functional tests for typo3DatabasePort, must be integer
1 participant