note 73920 added to function.escapeshellarg

From: Date: Thu, 15 Mar 2007 17:45:23 +0000
Subject: note 73920 added to function.escapeshellarg
Groups: php.notes 
Request: Send a blank email to php-notes+get-124487@lists.php.net to get a copy of this message
In reply to vosechu at roman-fleuve dot com: Even if it's two "'s or two ''s, this function wouldn't work the way it's supposed to (that is, returning nothing). However, most people do not put "" into their commands... When many commands are executed, the order of the parameters is of critical importance, especially with shell scripts where $1, $2, $3, etc. are commonly used without checking what is stored in them first. In such cases, having this function not return even an empty parameter will break things. As was mentioned earlier, putting two single quotes '' before the output of this function will remedy this issue, as the '' in itself will not add any characters to that command line parameter, but it will turn it into a placeholder for that parameter when the value is empty. ---- Server IP: 66.207.199.35 Probable Submitter: 24.84.7.1 ---- Manual Page -- http://www.php.net/manual/en/function.escapeshellarg.php Edit -- https://master.php.net/note/edit/73920 Del: integrated -- https://master.php.net/note/delete/73920/integrated Del: useless -- https://master.php.net/note/delete/73920/useless Del: bad code -- https://master.php.net/note/delete/73920/bad+code Del: spam -- https://master.php.net/note/delete/73920/spam Del: non-english -- https://master.php.net/note/delete/73920/non-english Del: in docs -- https://master.php.net/note/delete/73920/in+docs Del: other reasons-- https://master.php.net/note/delete/73920 Reject -- https://master.php.net/note/reject/73920 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#124487) next »