Skip to content

Commit

Permalink
- fix bug #5830 fatal reference issues caused ba array_shift on funct…
Browse files Browse the repository at this point in the history
…ions return value

- change license to BSD


git-svn-id: http://svn.php.net/repository/pear/packages/HTTP_Header/trunk@200246 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
m6w6 committed Nov 8, 2005
1 parent 40b7725 commit e1c3f7e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 22 deletions.
9 changes: 1 addition & 8 deletions Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@
*
* PHP versions 4 and 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category HTTP
* @package HTTP_Header
* @author Wolfram Kriesing <wk@visionp.de>
* @author Davey Shafik <davey@php.net>
* @author Michael Wallner <mike@php.net>
* @copyright 2003-2005 The Authors
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @license BSD, revised
* @version CVS: $Id$
* @link http://pear.php.net/package/HTTP_Header
*/
Expand Down Expand Up @@ -110,7 +104,6 @@
*
* @package HTTP_Header
* @category HTTP
* @license PHP License
* @access public
* @version $Revision$
*/
Expand Down
11 changes: 2 additions & 9 deletions Header/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@
*
* PHP versions 4 and 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category HTTP
* @package HTTP_Header
* @author Wolfram Kriesing <wk@visionp.de>
* @author Michael Wallner <mike@php.net>
* @copyright 2003-2005 The Authors
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @license BSD, revised
* @version CVS: $Id$
* @link http://pear.php.net/package/HTTP_Header
*/
Expand Down Expand Up @@ -49,7 +43,6 @@
*
* @package HTTP_Header
* @category HTTP
* @license PHP License
* @access public
* @version $Revision$
*/
Expand Down Expand Up @@ -92,7 +85,7 @@ function HTTP_Header_Cache($expires = 0, $unit = 'seconds')
function getCacheStart()
{
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && !$this->isPost()) {
return strtotime(array_shift(explode(';',
return strtotime(current($array = explode(';',
$_SERVER['HTTP_IF_MODIFIED_SINCE'])));
}
return time();
Expand Down
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2004-2005, Michael Wallner <mike@iworks.at>.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12 changes: 7 additions & 5 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.1">
<!-- $Revision: 1.34 $ -->
<!-- $Revision: 1.35 $ -->
<package version="1.0">
<name>HTTP_Header</name>
<summary>
Expand Down Expand Up @@ -32,13 +32,14 @@ It also provides methods for checking Status types.
</maintainer>
</maintainers>
<release>
<version>1.1.3</version>
<version>1.2.0</version>
<date>2005-09-00</date>
<license>PHP License</license>
<state>stable</state>
<license>BSD, revised</license>
<state>beta</state>
<notes>
<![CDATA[
* Fixed Bug #5404 - Headers cannot be unset
* Fixed Bug #5830 - only variables can be passed by reference
* Changed license to BSD
]]>
</notes>
<filelist>
Expand All @@ -48,6 +49,7 @@ It also provides methods for checking Status types.
<file role="php">Cache.php</file>
</dir>
</dir>
<file role="doc">LICENSE</file>
<file role="test" install-as="response.php">tests/response.php</file>
<file role="test" install-as="cacheresponse.php">tests/cacheresponse.php</file>
<file role="test" install-as="header.php">tests/header.php</file>
Expand Down

0 comments on commit e1c3f7e

Please sign in to comment.