Skip to content

Commit

Permalink
bug fix in rules
Browse files Browse the repository at this point in the history
  • Loading branch information
rafageist committed Jul 23, 2019
1 parent db68740 commit d04c071
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Jul 23, 2019
-------------------
- `fix`: bug fix in rules
- `release`: version 2.3.2

Jul 18, 2019
-------------------
- `fix`. Fix lost data resulting from "file control points"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Div PHP Ways 2.3.1
# Div PHP Ways 2.3.2

A "way" is different to a "route". We need a path for found
a specific resource, but we need a way for do something.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"controllers"
],
"homepage": "https://divengine.com/ways",
"version": "2.3.1",
"version": "2.3.2",
"require": {
"php": ">=5.4.0",
"ext-json": "*"
Expand Down
8 changes: 6 additions & 2 deletions src/ways.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*
* @package divengine/ways
* @author Rafa Rodriguez [@rafageist] <[email protected]>
* @version 2.3.1
* @version 2.3.2
*
* @link https://divengine.com
* @link https://divengine.com/ways
Expand Down Expand Up @@ -57,7 +57,7 @@ class ways

const PROPERTY_RULES = 'rules';

private static $__version = '2.3.1';
private static $__version = '2.3.2';

private static $__way_var;

Expand Down Expand Up @@ -1433,6 +1433,10 @@ public static function register($path, $properties = [])
foreach ($rules as $rule) {
if (!empty(self::$__controllers[$prop[self::PROPERTY_ID]])) {

if (!isset(self::$__controllers[$prop[self::PROPERTY_ID]]['prop'][self::PROPERTY_RULES])){
self::$__controllers[$prop[self::PROPERTY_ID]]['prop'][self::PROPERTY_RULES] = [];
}

if (is_string(self::$__controllers[$prop[self::PROPERTY_ID]]['prop'][self::PROPERTY_RULES])) {
self::$__controllers[$prop[self::PROPERTY_ID]]['prop'][self::PROPERTY_RULES] = [self::$__controllers[$prop[self::PROPERTY_ID]]['prop'][self::PROPERTY_RULES]];
}
Expand Down

0 comments on commit d04c071

Please sign in to comment.