Skip to content

Commit

Permalink
Removed logging statement for invalid slug #1459
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed May 4, 2017
1 parent 83ed2aa commit 958557d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

1. [](#improved)
* Add more controls over HTML5 video attributes (autoplay, poster, loop controls) [#1442](https://github.com/getgrav/grav/pull/1442)
* Removed logging statement for invalid slug [#1459](https://github.com/getgrav/grav/issues/1459)
1. [](#bugfix)
* Fix to force route/redirect matching from the start of the route by default [#1446](https://github.com/getgrav/grav/issues/1446)

Expand Down
3 changes: 0 additions & 3 deletions system/src/Grav/Common/Page/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -1497,9 +1497,6 @@ public function slug($var = null)
{
if ($var !== null && $var !== "") {
$this->slug = $var;
if (!preg_match('/^[a-z0-9][-a-z0-9]*$/', $this->slug)) {
Grav::instance()['log']->notice("Invalid slug set in YAML frontmatter: " . $this->rawRoute() . " => " . $this->slug);
}
}

if (empty($this->slug)) {
Expand Down

0 comments on commit 958557d

Please sign in to comment.