From: Steve Sutton Date: Wed, 17 Jan 2018 20:02:13 +0000 (-0500) Subject: Update add event form to chop intro field if too long. X-Git-Tag: v1.6.73^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=eb971a995fc19a5390c4457e0a5adaa4c526de93;p=WP-Plugins%2Fglm-member-db-events.git Update add event form to chop intro field if too long. Causing issues with the db insert. if longer than 255 it just won't insert the record. --- diff --git a/index.php b/index.php index 22f3799..84b19ef 100644 --- a/index.php +++ b/index.php @@ -47,7 +47,7 @@ if (!defined('ABSPATH')) { * so that we're sure the other add-ons see an up to date * version from this plugin. */ -define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.6.72'); +define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.6.73'); define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.1.4'); // This is the minimum version of the GLM Members DB plugin require for this plugin. diff --git a/models/front/events/frontAdd.php b/models/front/events/frontAdd.php index fd06b9d..a71d939 100644 --- a/models/front/events/frontAdd.php +++ b/models/front/events/frontAdd.php @@ -444,6 +444,8 @@ class GLmMembersFront_events_frontAdd extends GlmDataEvents } } // mySql transactions + // Need to limit intro field to no more than 165 + $intro = substr( $intro, 0, 165 ); $eventData = array( 'status' => '20', 'created' => $date,