diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0e8f9208e..43149a09b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,7 +9,9 @@
1. [](#bugfix)
* Force question to install demo content in theme update [#2493](https://github.com/getgrav/grav/issues/2493)
* Fixed GPM errors from blueprints not being logged [#2505](https://github.com/getgrav/grav/issues/2505)
-
+ * Don't error when IP is invalid [#2507](https://github.com/getgrav/grav/issues/2507)
+ * Fixed regression with `bin/plugin` not listing the plugins available (1c725c0)
+
# v1.6.9
## 05/09/2019
diff --git a/bin/plugin b/bin/plugin
index 6f8466d81..3c431e379 100755
--- a/bin/plugin
+++ b/bin/plugin
@@ -79,19 +79,6 @@ $output = new ConsoleOutput();
$output->getFormatter()->setStyle('red', new OutputFormatterStyle('red', null, array('bold')));
$output->getFormatter()->setStyle('white', new OutputFormatterStyle('white', null, array('bold')));
-if (is_null($plugin)) {
- $output->writeln('');
- $output->writeln("$name plugin not found");
- die;
-}
-
-if (!$plugin->enabled) {
- $output->writeln('');
- $output->writeln("$name not enabled");
- die;
-}
-
-
if (!$name) {
$output->writeln('');
$output->writeln('Usage:');
@@ -123,6 +110,18 @@ if (!$name) {
}
exit;
+} else {
+ if (is_null($plugin)) {
+ $output->writeln('');
+ $output->writeln("$name plugin not found");
+ die;
+ }
+
+ if (!$plugin->enabled) {
+ $output->writeln('');
+ $output->writeln("$name not enabled");
+ die;
+ }
}
if ($plugin === null) {
diff --git a/system/src/Grav/Common/Page/Medium/ParsedownHtmlTrait.php b/system/src/Grav/Common/Page/Medium/ParsedownHtmlTrait.php
index 365cf1d66..c6d75bc77 100644
--- a/system/src/Grav/Common/Page/Medium/ParsedownHtmlTrait.php
+++ b/system/src/Grav/Common/Page/Medium/ParsedownHtmlTrait.php
@@ -10,6 +10,7 @@
namespace Grav\Common\Page\Medium;
use Grav\Common\Markdown\Parsedown;
+use Grav\Common\Page\Markdown\Excerpts;
trait ParsedownHtmlTrait
{
@@ -33,7 +34,7 @@ trait ParsedownHtmlTrait
$element = $this->parsedownElement($title, $alt, $class, $id, $reset);
if (!$this->parsedown) {
- $this->parsedown = new Parsedown();
+ $this->parsedown = new Parsedown(new Excerpts());
}
return $this->parsedown->elementToHtml($element);
diff --git a/system/src/Grav/Common/Utils.php b/system/src/Grav/Common/Utils.php
index ad9b289f3..9b0992f99 100644
--- a/system/src/Grav/Common/Utils.php
+++ b/system/src/Grav/Common/Utils.php
@@ -1494,12 +1494,11 @@ abstract class Utils
* @param int $prefix
*
* @return string
- * @throws \InvalidArgumentException if provided an invalid IP
*/
public static function getSubnet($ip, $prefix = 64)
{
if (!filter_var($ip, FILTER_VALIDATE_IP)) {
- throw new \InvalidArgumentException('Invalid IP: ' . $ip);
+ return $ip;
}
// Packed representation of IP