|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68823 Useles check
Submitted: 2015-01-13 05:12 UTC Modified: 2018-08-05 04:00 UTC
From: bugreports at internot dot info Assigned: carusogabriel (profile)
Status: Closed Package: *General Issues
PHP Version: master-Git-2015-01-13 (Git) OS: Linux Ubuntu 14.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: bugreports at internot dot info
New email:
PHP Version: OS:


 [2015-01-13 05:12 UTC] bugreports at internot dot info

In /main/php_open_temporary_file.c:

247#ifdef P_tmpdir
248        /* Use the standard default temporary directory. */
249        if (P_tmpdir) {
250                temporary_directory = strdup(P_tmpdir);
251                return temporary_directory;
252        }

249        if (P_tmpdir) {
is useless due to 2 reasons:
1. it's an array, and cannot be NULL.
2. the check at line 247 should be fine as it is.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-13 19:15 UTC] phpmpan at mpan dot pl
`P_tmpdir` has type `char*`: <>.
 [2018-08-05 04:00 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: carusogabriel
 [2018-08-05 04:00 UTC]
Closing as phpmpan said, it has the `char *` type and can be null: `P_tmpdir` has type `char*`: <>.
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon May 20 02:01:26 2019 UTC