Handle empty strings better.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3311 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
a1ccff276f
commit
fe12ae4ee2
|
@ -184,6 +184,7 @@ sub generateConfigSQL
|
||||||
sub addSlashes
|
sub addSlashes
|
||||||
{
|
{
|
||||||
my $string = shift;
|
my $string = shift;
|
||||||
|
return( "" ) unless $string;
|
||||||
$string =~ s|(['"])|\\$1|g;
|
$string =~ s|(['"])|\\$1|g;
|
||||||
return( $string );
|
return( $string );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue