Skip to content

Commit

Permalink
patch 3.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
metalwolf committed Jan 6, 2018
1 parent be564e2 commit 603ffff
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ To change the build:

---

Build v3.0.9 2018-01-05
- bug corrected on destructor to be sure the shm has been created before its destruction
- bug corrected into WADebug->doDebug to print correctly the variables passed through '%'

Build v3.0.8 2018-01-02
- the data portion of an XML entry may come empty, so the WALanguageCompiler code has been modified to avoid a PHP warning

Expand Down
11 changes: 9 additions & 2 deletions include/core/WADebug.lib
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
Changes:
2015-06-09: Phil, add self::$debug to null, to protect the setDebug if used before the first instanciation
2017-01-31: Phil, version change: adjustments on \Error, \Exception and throwable trait not capturable
2018-02-05: Phil, bug corrected into doDebug to print the variables passed
*/

/* @UML_Box
Expand Down Expand Up @@ -86,7 +87,7 @@ namespace core;
class WADebug
{
// DomCore version
const VERSION = '3.0.8';
const VERSION = '3.0.9';

// All the functions entry
const SYSTEM = 1;
Expand Down Expand Up @@ -284,7 +285,13 @@ class WADebug
{
$num = 1;
foreach($args as $arg)
$message = str_replace('%', $this->__getValue($arg), $message);
{
$pos = strpos($message, '%');
if ($pos !== false)
{
$message = substr_replace($message, $this->__getValue($arg), $pos, strlen('%'));
}
}
}
if (self::$filter && stripos($message, self::$filter) === false)
return;
Expand Down
4 changes: 3 additions & 1 deletion include/core/WASHM.lib
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

Changes:
2015-11-16: Phil, Rewrite the library to be fast, use implicit var mapper and only give support for files (for AFO cache files from datasources). The variables mapper is still available but under specific conditions and optinos.
2018-01-05: Phil, but corrected on destructor to be sure the shm has been created before its destruction

*/

Expand Down Expand Up @@ -98,7 +99,8 @@ class WASHM extends WADebug

public function __destruct()
{
shm_detach($this->shm);
if ($this->shm)
shm_detach($this->shm);
$this->shm = null;
}

Expand Down

0 comments on commit 603ffff

Please sign in to comment.