Bug #65529
closedhandler_init - wrong management of port if null
0%
Description
On \TYPO3\CMS\Dbal\Database\DatabaseConnection, method handler_init
If $handlerKey === '_DEFAULT', the current port (this->handlerCfg[$handlerKey]['config']['port') is set to (int)$this->databasePort.
If $this->databasePort is 0, 0.1, it's ok. However, if it's null, it returns 0;
By this way, when using for mssqlnative,
$cfgArray['config']['host'] . (isset($cfgArray['config']['port']) ? ':' . $cfgArray['config']['port'] : '') (Line 3102)
always renders, for example :
8.8.8.8:0
It causing an error.
To avoid this, I suggest :
if(isset($this->databasePort)) { $this->handlerCfg[$handlerKey]['config']['port'] = (int)$this->databasePort; }
instead of
$this->handlerCfg[$handlerKey]['config']['port'] = (int)$this->databasePort; (line 3020)
By this way, if it's null, it won't render ":0".
Updated by Xavier Perseguers over 9 years ago
- Status changed from New to Needs Feedback
The port handling has been adapted today for both master and 6.2 with #66830 and #63070. As you are using 6.2, please update to HEAD or apply patch from http://review.typo3.org/39335 and report if fixed. Thanks.
Updated by Guy Couronné over 9 years ago
Thank you.
This issue could be closed.
Updated by Wouter Wolters over 9 years ago
- Status changed from Needs Feedback to Closed
Closed as requested by the author