Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yaf ini加载的配置文件,使用运算符??返回结果错误 #422

Open
gaecom opened this issue Dec 19, 2018 · 1 comment
Open

yaf ini加载的配置文件,使用运算符??返回结果错误 #422

gaecom opened this issue Dec 19, 2018 · 1 comment

Comments

@gaecom
Copy link

gaecom commented Dec 19, 2018

($cfg[$cfg['def_db']]['w'][1]['host'])??'localhost' 返回localhost
($cfg[$cfg['def_db']]['w'][1])??'localhost' 返回 localhost
而$cfg[$cfg['def_db']]['w'][1]['host']===‘mongodb’,$cfg[$cfg['def_db']]['w'][1]===yafConfig的对象

mac os x php 7.2.1的条件下出现
$cfg是yaf ini加载的config,$cfg[$cfg['def_db']]['w'][1]['host']==='mongo' 存在的情况下,返回却是localhost

换成$cfg=$cfg->toArray() 执行上面代码 都返回正确

@letwang
Copy link

letwang commented May 31, 2019

回避吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants