Doc #80292 [Ver->Csd]: Incorrect use of code in manual's example codes.

From: Date: Wed, 28 Oct 2020 13:12:11 +0000
Subject: Doc #80292 [Ver->Csd]: Incorrect use of code in manual's example codes.
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18043@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80292&edit=1 ID: 80292 Updated by: phpdocbot@php.net Reported by: astrixoblix dot b at gmail dot com Summary: Incorrect use of code in manual's example codes. -Status: Verified +Status: Closed Type: Documentation Problem Package: Zip Related PHP Version: Irrelevant Assigned To: cmb Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmb Revision: http://git.php.net/?p=doc/en.git;a=commit;h=3f1917852ecf1a1dbf126d4bee4ef0d918653056 Log: Fix #80292: Incorrect use of code in manual's example codes Previous Comments: ------------------------------------------------------------------------ [2020-10-28 12:56:47] cmb@php.net Well, to clarify, the code works as it should because it is equivalent to: if (!($zip->status == ZipArchive::ER_OK)) { However, that is clumsy and misleading. ------------------------------------------------------------------------ [2020-10-28 12:27:00] astrixoblix dot b at gmail dot com Description: ------------ --- From manual page: https://php.net/ziparchive.locatename --- In example #1 line #13 there's an additional exclamation mark by mistake. I supposed the code has been changed from !$zip->status to $zip->status != ZipArchive::ER_OK but correct code got lost during patches. affected line: if (!$zip->status == ZipArchive::ER_OK) { correct line: if ($zip->status != ZipArchive::ER_OK) { ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80292&edit=1

« previous php.doc.bugs (#18043) next »