magento-lts icon indicating copy to clipboard operation
magento-lts copied to clipboard

Change initStatements to charset option when create db connection.

Open forfin opened this issue 5 months ago • 4 comments

  • This option pass to Zend_Db_Adapter_Pdo_Abstract (parent of Mage_Core_Model_Resource_Type_Db_Pdo_Mysql) when init new PDO
  • SET NAMES utf8 might be there as a workaround for php < 5.3.6 but should not be a case anymore.
  • Ref
    • https://stackoverflow.com/questions/4361459/php-pdo-charset-set-names
    • https://stackoverflow.com/questions/1650591/whether-to-use-set-names

*When Openmage start. It seems to merge every etc/*.xml config including this file. So before this commit, end-user who want to remove initStatements must explicitly set empty to <initStatements /> in later file. Otherwise it still be there.

Contribution checklist (*)

  • [x] Pull request has a meaningful description of its purpose
  • [x] All commits are accompanied by meaningful commit messages
  • [x] All automated tests passed successfully (all builds are green)
  • [x] Add yourself to contributors list

forfin avatar Aug 28 '24 21:08 forfin