From daebf05f9bde4f80caa7d398bc582acab66405cc Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Fri, 20 May 2016 13:13:03 -0600 Subject: [PATCH] Make URI::ip() static by default --- CHANGELOG.md | 1 + system/src/Grav/Common/Uri.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66a07aa08..3091a1095 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ 1. [](#improved) * Updated jQuery from 2.2.0 to 2.2.3 + * Set `Uri::ip()` to static by default so it can be used in form fields 1. [](#bugfix) * Fixed "Invalid slug set in YAML frontmatter" when setting `Page::slug()` with empty string [#580](https://github.com/getgrav/grav-plugin-admin/issues/580) * Only `.gitignore` Grav's vendor folder diff --git a/system/src/Grav/Common/Uri.php b/system/src/Grav/Common/Uri.php index a760e504b..3d16b9490 100644 --- a/system/src/Grav/Common/Uri.php +++ b/system/src/Grav/Common/Uri.php @@ -687,7 +687,7 @@ class Uri * * @return string ip address */ - public function ip() + public static function ip() { if (getenv('HTTP_CLIENT_IP')) $ipaddress = getenv('HTTP_CLIENT_IP');