Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: PHP-8.4.1
-
Fix Version/s: PHP-8.4.1, PHP-Apricot
-
Component/s: PHPDriver
-
Labels:None
Description
Test Build: CUBRID 2008 R4.1 (8.4.1.1018) (64bit release build for linux_gnu)
OS: Linux 64
Description:
First:
Connection succeeds using cubrid_pconnect method and passing five correct value to this method.
Second:
Passing a error passwd to cubrid_pconnect method, connection will success too.
Repro steps:
1. execute: php pconnectest1.phpt
statements in pconnectest1.phpt
$host = "localhost";
$port = 33113;
$db = "demodb";
$user = "dba";
$passwd = "";
if (!($pconn1 = cubrid_pconnect($host, $port, $db, $user, $passwd))) {
printf("[001] Can not connect to the server using host=%s, port=%s, user=%s, passwd=***\n", $host, $port, $user);
}else{
printf("[001]pconn values: %s \n",$pconn1);
}
$pconn4 = cubrid_pconnect($host, $port, $db,"dba","dioado");
if (FALSE == $pconn4) {
printf("[004]Expect: return value false, [%d] [%s]\n", cubrid_error_code(), cubrid_error_msg());
}elseif(TRUE == $pconn4){
printf("[004]No Expect: return value true, [%d] [%s]\n", cubrid_error_code(), cubrid_error_msg());
printf("[004]pconn: %s\n",$pconn4);
}else{
printf("[004]no true and no fal
Actual result:
[001]pconn values: Resource id #4 [004]No Expect: return value true, [0] [] [004]pconn: Resource id #5
Expect result:
Maybe connection will fail when passing a error passwd to cubrid_pconnect() method.
Commit rev: 491