Skip to content

Commit

Permalink
nil should be 'escaped' to empty string in php
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabrizio Monti committed Apr 8, 2014
1 parent 15bc93c commit c93b15f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/wordmove/deployer/ftp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def remote_put(thing, path)
end

def escape_php(string)
return '' unless string

# replaces \ with \\
# replaces ' with \'
string.gsub('\\','\\\\\\').gsub(/[']/, '\\\\\'')
Expand Down

0 comments on commit c93b15f

Please sign in to comment.