Skip to content

Commit

Permalink
Merge pull request #6786 from monishdeb/CRM-17247
Browse files Browse the repository at this point in the history
CRM-17247 fix - Vaildation fails silently on required fields (Drupal …
  • Loading branch information
monishdeb committed Sep 22, 2015
2 parents 70b4908 + b247a73 commit 43ee735
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CRM/Core/BAO/UFGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -715,8 +715,8 @@ protected static function getCustomFields($ctype) {
*
* @param int $userID
* The user id that we are actually editing.
* @param string $title
* The title of the group we are interested in.
* @param string $name
* The machine-name of the group we are interested in.
* @param bool $register
* @param int $action
* The action of the form.
Expand All @@ -725,7 +725,7 @@ protected static function getCustomFields($ctype) {
* @return bool
* true if form is valid
*/
public static function isValid($userID, $title, $register = FALSE, $action = NULL) {
public static function isValid($userID, $name, $register = FALSE, $action = NULL) {
if ($register) {
$controller = new CRM_Core_Controller_Simple('CRM_Profile_Form_Dynamic',
ts('Dynamic Form Creator'),
Expand All @@ -740,7 +740,7 @@ public static function isValid($userID, $title, $register = FALSE, $action = NUL
// make sure we have a valid group
$group = new CRM_Core_DAO_UFGroup();

$group->title = $title;
$group->name = $name;

if ($group->find(TRUE) && $userID) {
$controller = new CRM_Core_Controller_Simple('CRM_Profile_Form_Dynamic', ts('Dynamic Form Creator'), $action);
Expand Down

0 comments on commit 43ee735

Please sign in to comment.