[SOLVED]cf_profile PHP Error

GreyHead 13 Jun, 2009
The cf_profile plugin shows a PHP error in an input field if the field value isn't found in the $_POST array

Fix: make the preg_replaces in lines 256 & 270 (approx) include an if clause
$namematch = preg_replace($pattern_name, 'name="${2}" value="<?php if ( isset($MyForm->posted[\'${2}\']) ) echo $MyForm->posted[\'${2}\']; ?>"', $valuematch);


Bob
Max_admin 21 Jun, 2009
yes, it was doing this with all other fields types as well, nice catch, I added a php loop to set any field value to '' in the post array if it doesn't exist!

Thanks!
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.