Skip to content

Commit

Permalink
Merge pull request #16415 from niden/T16414-route-routeid-type-error
Browse files Browse the repository at this point in the history
T16414 route routeid type error
  • Loading branch information
niden authored Aug 24, 2023
2 parents 94148c8 + 3caf2ef commit fd62e2a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/actions/pack-phalcon-ext/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ runs:
& 7z a "${{ inputs.target-name }}.zip" *
- name: Upload Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.target-name }}.zip
path: ./build-artifacts/phalcon*.zip
7 changes: 7 additions & 0 deletions CHANGELOG-5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
- Fixed memory leak in Micro application [#16404](https://github.com/phalcon/cphalcon/pull/16404)


## [5.3.1](https://github.com/phalcon/cphalcon/releases/tag/v5.3.1) (xxxx-xx-xx)

### Fixed

- Forced `routeId` in `Phalcon\Mvc\Router\Route` to always return a string [#16414](https://github.com/phalcon/cphalcon/pull/16414)


## [5.2.3](https://github.com/phalcon/cphalcon/releases/tag/v5.2.3) (2023-07-26)

### Fixed
Expand Down
12 changes: 6 additions & 6 deletions phalcon/Mvc/Router/Route.zep
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ class Route implements RouteInterface
protected hostname = null;

/**
* @var string|null
* @var string
*/
protected id = null;
protected id = "";

/**
* @var array|string
Expand Down Expand Up @@ -94,8 +94,8 @@ class Route implements RouteInterface
let uniqueId = self::uniqueId;

// TODO: Add a function that increase static members
let routeId = uniqueId,
this->id = routeId,
let routeId = uniqueId,
this->id = (string) routeId,
self::uniqueId = uniqueId + 1;
}

Expand Down Expand Up @@ -383,9 +383,9 @@ class Route implements RouteInterface
}

/**
* @return string | null
* @return string
*/
public function getId() -> string | null
public function getId() -> string
{
return this->id;
}
Expand Down

0 comments on commit fd62e2a

Please sign in to comment.