summaryrefslogtreecommitdiff
path: root/zend/ini.cpp
diff options
context:
space:
mode:
authorvalmat <ufabiz@gmail.com>2014-04-10 13:04:34 +0600
committervalmat <ufabiz@gmail.com>2014-04-10 13:04:34 +0600
commit14b63ee87dde3688fea7e58fa25b73362117ae11 (patch)
tree0611b2d6ccc4edfb27e350f4925cbe169c2520a7 /zend/ini.cpp
parent1a6b709b8f732ea8a91b07a74f64928e0484b1f6 (diff)
Fixed problem with duplicate names ini entries.
Mentioned https://github.com/CopernicaMarketingSoftware/PHP-CPP/issues/64#issuecomment-39838004 Now in the case of duplication name of ini entriy the new value overrides the old one. Before was incorrect handling of this situation.
Diffstat (limited to 'zend/ini.cpp')
-rw-r--r--zend/ini.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/zend/ini.cpp b/zend/ini.cpp
index e6a9888..0c04d6a 100644
--- a/zend/ini.cpp
+++ b/zend/ini.cpp
@@ -21,8 +21,8 @@ namespace Php {
{
ini_entry->module_number = module_number;
ini_entry->modifiable = static_cast<int>(this->_place);
- ini_entry->name = const_cast<char*>(this->_name);
- ini_entry->name_length = strlen(this->_name)+1;
+ ini_entry->name = const_cast<char*>(this->_name.c_str());
+ ini_entry->name_length = this->_name.size()+1;
ini_entry->on_modify = OnUpdateString;
ini_entry->mh_arg1 = nullptr;
#ifdef ZTS