note 120220 added to context.ftp

From: Date: Thu, 24 Nov 2016 19:01:24 +0000
Subject: note 120220 added to context.ftp
Groups: php.notes 
Request: Send a blank email to php-notes+get-207558@lists.php.net to get a copy of this message
Apparently the overwrite-option only registers as false if it's absent. If I specify it as false, it acts the same as true and overwrites. Then, <?php if (empty($opts['overwrite'])) { unset($opts['overwrite']); } ?> ...was the simple fix for my FTP stream wrapper class sporting default options. This is quite unexpected though; false means false even if I say so? Apparently PHP (7.0.2) just checks if the option exists, not its boolean value. ---- Server IP: 72.52.91.14 Probable Submitter: 128.199.128.196 ---- Manual Page -- http://php.net/manual/en/context.ftp.php Edit -- https://master.php.net/note/edit/120220 Del: integrated -- https://master.php.net/note/delete/120220/integrated Del: useless -- https://master.php.net/note/delete/120220/useless Del: bad code -- https://master.php.net/note/delete/120220/bad+code Del: spam -- https://master.php.net/note/delete/120220/spam Del: non-english -- https://master.php.net/note/delete/120220/non-english Del: in docs -- https://master.php.net/note/delete/120220/in+docs Del: other reasons-- https://master.php.net/note/delete/120220 Reject -- https://master.php.net/note/reject/120220 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#207558) next »