Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution to the Bug to edit Person Properties Group Properties PDFLabel ..... #2719

Closed
phili67 opened this issue Jul 6, 2017 · 1 comment · Fixed by #2737
Closed

Solution to the Bug to edit Person Properties Group Properties PDFLabel ..... #2719

phili67 opened this issue Jul 6, 2017 · 1 comment · Fixed by #2737

Comments

@phili67
Copy link

phili67 commented Jul 6, 2017

The code is buggy in : ChurchCRM/utils/InputUtils.php

first :

  1. the $size is not mentioned in varible
    public static function FilterChar($sInput)
    {
    $sInput = mb_substr(trim($sInput), 0, $size);
    if (get_magic_quotes_gpc()) {
    $sInput = stripslashes($sInput);
    }
    }

So I modify this like :
public static function FilterChar($sInput ,$size=1 )
{
$sInput = mb_substr(trim($sInput), 0, $size);
if (get_magic_quotes_gpc()) {
$sInput = stripslashes($sInput);
}
return $sInput;
}

Last, I modify the code at the end :
case 'char':
return mysqli_real_escape_string($cnInfoCentral, self::FilterChar($sInput ,$size ));

You can put the source code in : ChurchCrm/utils/InputUtils.php
You unzip the file
InputUtils.php.zip

@phili67 phili67 changed the title Bug to edit Person Properties Group Properties ..... Solution to the Bug to edit Person Properties Group Properties ..... Jul 6, 2017
@phili67 phili67 changed the title Solution to the Bug to edit Person Properties Group Properties ..... Solution to the Bug to edit Person Properties Group Properties PDFLabel ..... Jul 6, 2017
@ghost ghost assigned crossan007 Jul 7, 2017
@ghost ghost added the In Review label Jul 7, 2017
@crossan007 crossan007 removed their assignment Jul 7, 2017
@crossan007
Copy link
Contributor

relates to #2622

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants