-
-
Notifications
You must be signed in to change notification settings - Fork 468
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
BUG change yaconf value #1879
Comments
It should be something like this: class Test {
+ private config = [];
public function __construct(array! config) {
var k, v;
for k, v in config["dir"] {
let config["dir"][k] = realpath(v);
}
+ let this->config = config;
}
+ public function get()
+ {
+ return this->config;
+ }
} $config = Yaconf::get('example');
print_r($config);
- new \Example\Test($config);
+ $test = new \Example\Test($config);
- print_r($config);
+ print_r($test->get());
|
$config = Yaconf::get('example');
print_r($config);
new \Example\Test($config); The correct one should be the same every time the output is the same. In this code it must output result 1 every time, but actually it sometimes outputs result 1 and sometimes outputs result 2 // result 1:
Array
(
[dir] => Array
(
[a] => ../test/dir
)
)
// result 2:
Array
(
[dir] => Array
(
[a] => /tmp/test/dir
)
) |
@dreamsxin Any idea on this? 🤔 |
@sergeyklay I will try fix |
dreamsxin
added a commit
to dreamsxin/zephir
that referenced
this issue
Jun 28, 2019
dreamsxin
added a commit
to dreamsxin/zephir
that referenced
this issue
Nov 6, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
example.ini
Test.zep
example.php
When I refresh my browser, the printed path is not fixed, sometimes relative, sometimes absolute.
https://github.com/laruence/yaconf
The text was updated successfully, but these errors were encountered: