Skip to content

Commit

Permalink
Fixed default type of the Annotation properties
Browse files Browse the repository at this point in the history
See: #14977
  • Loading branch information
sergeyklay authored and niden committed May 16, 2020
1 parent bfd9ac3 commit 8f22c89
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG-4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
- Fixed the Volt compiler to no longer parse `cache` fragments and thus searching for the `viewCache` service (deprecated for v4) [#14907](https://github.com/phalcon/cphalcon/issues/14907)
- Fixed `IN` operator precedence in Volt [#14816](https://github.com/phalcon/cphalcon/issues/14816)
- Fixed testing suite to work with PHPUnit 9 when we upgrade [#14837](https://github.com/phalcon/cphalcon/issues/14837)
- Fixed return type hints of the following `Phalcon\Acl\AbstractAdapter`'s methods: `getActiveAccess`, `getActiveRole`, `getActiveComponent` [#14974](https://github.com/phalcon/cphalcon/pull/14974)
- Fixed return type hints of the following `Phalcon\Acl\AbstractAdapter`'s methods: `getActiveAccess`, `getActiveRole` and `getActiveComponent` [#14974](https://github.com/phalcon/cphalcon/pull/14974)
- Fixed default value of the following `Phalcon\Annotations\Annotation`'s properties: `$arguments` and `$exprArguments` [#14977](https://github.com/phalcon/cphalcon/issues/14977)

# [4.0.5](https://github.com/phalcon/cphalcon/releases/tag/v4.0.5) (2020-03-07)
## Added
Expand Down
4 changes: 2 additions & 2 deletions phalcon/Acl/Adapter/AbstractAdapter.zep
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
* For the full copyright and license information, please view the
* LICENSE.txt file that was distributed with this source code.
*/

namespace Phalcon\Acl\Adapter;
Expand Down
16 changes: 10 additions & 6 deletions phalcon/Annotations/Annotation.zep
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
* For the full copyright and license information, please view the
* LICENSE.txt file that was distributed with this source code.
*/

namespace Phalcon\Annotations;
Expand All @@ -20,14 +20,14 @@ class Annotation
*
* @var array
*/
protected arguments;
protected arguments = [];

/**
* Annotation ExprArguments
*
* @var string
* @var array
*/
protected exprArguments;
protected exprArguments = [];

/**
* Annotation Name
Expand All @@ -44,7 +44,11 @@ class Annotation
var name, exprArguments, argument, resolvedArgument;
array arguments;

let this->name = reflectionData["name"];
if fetch name, reflectionData["name"] {
let this->name = reflectionData["name"];
} else {
let this->name = "";
}

/**
* Process annotation arguments
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Acl/Adapter/Memory/GetActiveAccessCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
* For the full copyright and license information, please view the
* LICENSE.txt file that was distributed with this source code.
*/

declare(strict_types=1);
Expand Down

0 comments on commit 8f22c89

Please sign in to comment.