php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43580 C function php_is_url() declared but does not exist in core
Submitted: 2007-12-12 11:36 UTC Modified: 2007-12-13 00:33 UTC
From: francois at tekwire dot net Assigned:
Status: Closed Package: Streams related
PHP Version: 5.2.5 OS: All
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: francois at tekwire dot net
New email:
PHP Version: OS:

 

 [2007-12-12 11:36 UTC] francois at tekwire dot net
Description:
------------
Hi,

I was looking for the php_is_url() function. It is documented in Sara's book, declared in main/fopen_wrappers.h, but not defined anywhere.

Looking in CVS, I found that it was defined in fopen_wrappers.c v 1.34 to detect only http/ftp URLs, as they were probably the only possible URLs at this time, and was removed in v 1.107.

If we decide that this function is not available anymore, the declaration must be removed from fopen_wrappers.h. If we want to define it, here is a way to do it :

PHPAPI int php_is_url(const char *path)
{
php_stream_wrapper *wrapper;

wrapper=php_stream_locate_url_wrapper(path, NULL, 0 TSRMLS_CC);
return (wrapper ? wrapper->is_url : 0); }


Reproduce code:
---------------
none

Expected result:
----------------
none

Actual result:
--------------
none

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-13 00:33 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 22:01:31 2024 UTC