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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 09:01:27 2024 UTC