-
-
Save bamz3r/167cf4618c2e6be5d0a76eeade8c5b41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($length != '' && ! preg_match($pattern, $type)) { | |
$lengthFix = str_replace(",", ".", $length); | |
if($lengthFix != $length){ | |
$modified = true; | |
} | |
if(is_numeric($lengthFix)){ | |
if($modified){ | |
$length = str_replace(".", ",", $lengthFix); | |
} | |
$query .= '(' . intval($length) . ')'; | |
} else { | |
$query .= '(' . $length . ')'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you very much! This worked for me.