Skip to content

Commit

Permalink
Changed ini_set('xdebug.overload_var_dump', 0)
Browse files Browse the repository at this point in the history
to ini_set('xdebug.overload_var_dump', '0')
  • Loading branch information
bkrukowski committed Oct 1, 2018
1 parent 1305542 commit 6e52303
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [1.2.1] - 2018-10-01

Function [`ini_set`](http://php.net/manual/en/function.ini-set.php) expects second argument as string,
changed `ini_set('xdebug.overload_var_dump', 0)` to `ini_set('xdebug.overload_var_dump', '0')`.

## [1.2.0] - 2018-09-29

Added support for `use` keyword in anonymous functions, e.g.:
Expand Down Expand Up @@ -76,6 +81,7 @@ $reflectionProp->getValue($obj);

This version contains the same source code as [0.12.0].

[1.2.1]: https://github.com/awesomite/var-dumper/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/awesomite/var-dumper/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/awesomite/var-dumper/compare/v1.0.3...v1.1.0
[1.0.3]: https://github.com/awesomite/var-dumper/compare/v1.0.2...v1.0.3
Expand Down
6 changes: 4 additions & 2 deletions src/InternalVarDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ public function dump($var)
{
$iniKey = 'xdebug.overload_var_dump';
$previousVal = \ini_get($iniKey);
\ini_set($iniKey, 0);
\ini_set($iniKey, '0');

if ($this->displayPlaceInCode) {
$this->dumpPlaceInCode(0);
}
\var_dump($var);

\ini_set($iniKey, $previousVal);
if (false !== $previousVal) {
\ini_set($iniKey, $previousVal);
}
}

public function dumpAsString($var)
Expand Down

0 comments on commit 6e52303

Please sign in to comment.