From:             sivavivekanantha at gmail dot com
Operating system: linux centos 6
PHP version:      5.4.11
Package:          PDO related
Bug Type:         Bug
Bug description:PDO::__construct(): Called dbsetopt with parameter 3 NULL 
(severity 11) 

Description:
------------
PDO::__construct(): Called dbsetopt with parameter 3 NULL (severity 11)


/var/www/framework/db/CDbConnection.php(423)

411     protected function createPdoInstance()
412     {
413         $pdoClass=$this->pdoClass;
414         if(($pos=strpos($this->connectionString,':'))!==false)
415         {
416            
$driver=strtolower(substr($this->connectionString,0,$pos));
417             if($driver==='mssql' || $driver==='dblib')
418                 $pdoClass='CMssqlPdoAdapter';
419             elseif($driver==='sqlsrv')
420                 $pdoClass='CMssqlSqlsrvPdoAdapter';
421         }
422         return new $pdoClass($this->connectionString,$this->username,
423                                    
$this->password,$this->_attributes);


Test script:
---------------
$sql = "[sp_Language] :Language_Code, :Language_Name, :Active, :Disp_Order,
:Action ";
           $command = $this->createCommand($sql);
           $command->bindParam(":Language_Code",    $languageCode, 
PDO::PARAM_INT);
           $command->bindParam(":Language_Name",        $language,              
PDO::PARAM_STR);
           $command->bindParam(":Active",                       $active,        
        PDO::PARAM_STR);
           $command->bindParam(":Disp_Order",           $displayOrder,  
PDO::PARAM_INT);        
           
           $command->bindParam(":Action",                       $action,        
        PDO::PARAM_INT);
 try {
                   $this->msg = '';     
               $command->execute();
                } 
                catch(Exception $e)
            {
                        //$this->msg = substr($ex->getMessage(),0,-30);
                        $this->msg = $e->getMessage();
//                      $this->msg = substr($e->errorInfo[2],0,-30);

        }


Expected result:
----------------
PDO::__construct(): Called dbsetopt with parameter 3 NULL (severity 11) 

Actual result:
--------------
Language Name Already Exists..this custom Exception shown in my UI

(I'm Using Sql stored procedure, that procedure throw custom message use
Raiserror command. That custom exception shown in my yii UI.)

-- 
Edit bug report at https://bugs.php.net/bug.php?id=64161&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64161&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64161&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=64161&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=64161&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=64161&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=64161&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=64161&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=64161&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=64161&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=64161&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=64161&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=64161&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=64161&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64161&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=64161&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=64161&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=64161&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64161&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=64161&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=64161&r=mysqlcfg

Reply via email to