mirror of
https://github.com/php/php-src.git
synced 2024-11-29 04:46:07 +08:00
Adapting tests to accept actual behaviour found in 5.2, 5.3 and 6.0. The behaviour is wrong according to the documentation: mysqli_connect_error() should return an empty string (not NULL), if there is no error. However, changing this would break BC and most users will not notice the difference between NULL and empty string anyway.
This commit is contained in:
parent
bf377f6aab
commit
671ebe958a
@ -55,7 +55,7 @@ object(mysqli)#%d (%d) {
|
||||
[%u|b%"connect_errno"]=>
|
||||
int(0)
|
||||
[%u|b%"connect_error"]=>
|
||||
%unicode|string%(0) ""
|
||||
NULL
|
||||
[%u|b%"errno"]=>
|
||||
int(0)
|
||||
[%u|b%"error"]=>
|
||||
@ -91,7 +91,7 @@ object(mysqli)#%d (%d) {
|
||||
[%u|b%"connect_errno"]=>
|
||||
int(0)
|
||||
[%u|b%"connect_error"]=>
|
||||
%unicode|string%(0) ""
|
||||
NULL
|
||||
[%u|b%"errno"]=>
|
||||
int(0)
|
||||
[%u|b%"error"]=>
|
||||
|
@ -276,6 +276,6 @@ setting mysqli->unknown, mysqli_unknown = '13'
|
||||
setting mysqli->unknown, mysqli_unknown = 'friday'
|
||||
|
||||
Access hidden properties for MYSLQI_STATUS_INITIALIZED (TODO documentation):
|
||||
mysqli->connect_error = ''/%unicode|string% (''/%unicode|string%)
|
||||
mysqli->connect_error = ''/NULL (''/NULL)
|
||||
mysqli->connect_errno = '0'/integer ('0'/integer)
|
||||
done!
|
@ -21,8 +21,8 @@ require_once('skipifconnectfailure.inc');
|
||||
printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
|
||||
$host, $user, $db, $port, $socket);
|
||||
|
||||
if ('' !== ($tmp = mysqli_connect_error()))
|
||||
printf("[003] Expecting string/'', got %s/%s\n", gettype($tmp), $tmp);
|
||||
if (NULL !== ($tmp = mysqli_connect_error()))
|
||||
printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
|
||||
|
||||
mysqli_close($link);
|
||||
|
||||
|
@ -91,7 +91,7 @@ object(mysqli)#%d (%d) {
|
||||
[%u|b%"connect_errno"]=>
|
||||
int(0)
|
||||
[%u|b%"connect_error"]=>
|
||||
%unicode|string%(0) ""
|
||||
NULL
|
||||
[%u|b%"errno"]=>
|
||||
int(2006)
|
||||
[%u|b%"error"]=>
|
||||
|
Loading…
Reference in New Issue
Block a user