From 5e0fbe5634ececedd7f9cddf4371028d34ad9db1 Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 1 Oct 2013 21:58:57 +0200 Subject: [PATCH] Macros - bugfix parameters --- src/Umbraco.Web/umbraco.presentation/macro.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/umbraco.presentation/macro.cs b/src/Umbraco.Web/umbraco.presentation/macro.cs index a457ceac72..7011426d9a 100644 --- a/src/Umbraco.Web/umbraco.presentation/macro.cs +++ b/src/Umbraco.Web/umbraco.presentation/macro.cs @@ -1312,8 +1312,11 @@ namespace umbraco break; case "mediaCurrent": - var c = new Content(int.Parse(macroPropertyValue)); - macroXmlNode.AppendChild(macroXml.ImportNode(c.ToXml(umbraco.content.Instance.XmlContent, false), true)); + if (string.IsNullOrEmpty(macroPropertyValue) == false) + { + var c = new Content(int.Parse(macroPropertyValue)); + macroXmlNode.AppendChild(macroXml.ImportNode(c.ToXml(umbraco.content.Instance.XmlContent, false), true)); + } break; default: