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

Bug: incorrect type - system/Database/MYSQLi/Connection.php #2996

Closed
John-Betong opened this issue May 15, 2020 · 1 comment
Closed

Bug: incorrect type - system/Database/MYSQLi/Connection.php #2996

John-Betong opened this issue May 15, 2020 · 1 comment
Labels
enhancement PRs that improve existing functionalities

Comments

@John-Betong
Copy link

Build: ace3f2c - Thursday May 14th, 2020

Over 420 files have the following declaration added:

<?php DECLARE(STRICT_TYPES=1); ?>

There is only a single file remaining which prevents STRICT_TYPES validation.

file: ./system/Database/MYSQLi/Connection.php
`
public function connect(bool $persistent = false)
{
// Do we have a socket path?
if ($this->hostname[0] === '/')
{
$hostname = null;
$port = null;
$socket = $this->hostname;
}
else
{
$hostname = ($persistent === true) ? 'p:' . $this->hostname : $this->hostname;
$port = empty($this->port) ? null : $this->port;
// OLD
$socket = null;
// NEW
$socket = (string) null; // JOHN ADDED (string)
}

`

Online demo: https://ci4-strict.tk

@John-Betong John-Betong added the bug Verified issues on the current code behavior or pull requests that will fix them label May 15, 2020
@michalsn michalsn added enhancement PRs that improve existing functionalities and removed bug Verified issues on the current code behavior or pull requests that will fix them labels Jun 22, 2020
@michalsn
Copy link
Member

PR is always welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement PRs that improve existing functionalities
Projects
None yet
Development

No branches or pull requests

2 participants