<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Getting nl2br warning when submitting form</title>
		<link>https://legacy.forums.gravityhelp.com/topic/getting-nl2br-warning-when-submitting-form</link>
		<description>Gravity Support Forums Topic: Getting nl2br warning when submitting form</description>
		<language>en-US</language>
		<pubDate>Tue, 21 Apr 2026 17:47:49 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/getting-nl2br-warning-when-submitting-form" rel="self" type="application/rss+xml" />

		<item>
			<title>Dana Cobb on "Getting nl2br warning when submitting form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-nl2br-warning-when-submitting-form#post-49695</link>
			<pubDate>Fri, 17 Feb 2012 11:49:29 +0000</pubDate>
			<dc:creator>Dana Cobb</dc:creator>
			<guid isPermaLink="false">49695@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, oceancountycoll,&#60;/p&#62;
&#60;p&#62;I knew an array was being passed, just didn't know which field combination was causing the issue so I could reproduce it. Thanks for the info.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Lucas Stark on "Getting nl2br warning when submitting form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-nl2br-warning-when-submitting-form#post-49685</link>
			<pubDate>Fri, 17 Feb 2012 09:40:54 +0000</pubDate>
			<dc:creator>Lucas Stark</dc:creator>
			<guid isPermaLink="false">49685@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I've posted this a couple of times, however, there are times when an Array is passed to nl2br.   This is the case in GFCommon::get_lead_field_display.  &#60;/p&#62;
&#60;p&#62;There is no case branch for every field.  Add a hidden product field to your form to see this in action.  Since there is no branch for hiddenproduct,  but the hiddenproduct value is an Array not a string,  it'll generate warnings.   &#60;/p&#62;
&#60;p&#62;Since there are many calls to nl2br, I would recommend refactoring into a GFCommon::nl2br function where you can then check the value before passing an invalid value to the PHP nl2br function.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Dana Cobb on "Getting nl2br warning when submitting form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-nl2br-warning-when-submitting-form#post-49629</link>
			<pubDate>Thu, 16 Feb 2012 16:24:55 +0000</pubDate>
			<dc:creator>Dana Cobb</dc:creator>
			<guid isPermaLink="false">49629@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, pidesign,&#60;/p&#62;
&#60;p&#62;I have seen this before but cannot reproduce the issue right now. Can you send me an export of your form with all its fields so I can reproduce the issue? You can email the form export file to me at &#34;dana@rocketgenius.com&#34;. Please reference this post.&#60;/p&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>pidesign on "Getting nl2br warning when submitting form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-nl2br-warning-when-submitting-form#post-49405</link>
			<pubDate>Tue, 14 Feb 2012 12:59:38 +0000</pubDate>
			<dc:creator>pidesign</dc:creator>
			<guid isPermaLink="false">49405@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm using the Directory addon with Gravity Forms and receive this warning message on the page after hitting submit:&#60;/p&#62;
&#60;p&#62;Warning: nl2br() expects parameter 1 to be string, array given in /home/pidesign/www/www/clients/sailpdx/wp-content/plugins/gravityforms/common.php on line 3796&#60;/p&#62;
&#60;p&#62;I get this warning 16 times. The data is successfully recorded though.&#60;/p&#62;
&#60;p&#62;Any ideas?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
