php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19215 ini_set returning FALSE when shouldn't
Submitted: 2002-09-03 15:28 UTC Modified: 2002-09-08 12:35 UTC
From: spam at mattbergin dot co dot uk Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 4.2.2 OS: Slackware 8.1 (2.4.19)
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: spam at mattbergin dot co dot uk
New email:
PHP Version: OS:

 

 [2002-09-03 15:28 UTC] spam at mattbergin dot co dot uk
When I set a configuration directive which has no value defined initially, ini_set returns FALSE, even though the call succeeded.

Example:

var_dump(ini_get('error_log'));
// bool(false)

var_dump(ini_set('error_log', '/tmp/foo'));
// bool(false)

var_dump(ini_get('error_log'));
// string(8) "/tmp/foo"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-03 15:54 UTC] sniper@php.net
What's the bug here? If some ini setting is not set at all, what should be returned else than false?


 [2002-09-03 16:09 UTC] spam at mattbergin dot co dot uk
So how do I tell the difference between when the call has failed or just that there was no previous value?
 [2002-09-08 12:35 UTC] kalowsky@php.net
It uses the hardcoded defaults.  So theres really no chance it won't be set.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Jan 28 05:03:34 2022 UTC