Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit d8e95de

Browse files
author
Maxim Shikula
committed
Merge tag 'release-1.12.13' into 1.12.13-dev
Zend Framework 1.12.13 - [567: Cast int and float to string when creating headers](zendframework#567) # gpg verification failed. # Conflicts: # README.md # library/Zend/Http/Client.php # library/Zend/Session.php # library/Zend/Version.php
2 parents d1e5cd8 + 9c9361f commit d8e95de

File tree

98 files changed

+1859
-233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+1859
-233
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ php:
66
- 5.4
77
- 5.5
88
- 5.6
9+
- 7
910
- hhvm
1011

1112
env: TMPDIR=/tmp
@@ -24,8 +25,9 @@ before_script:
2425
- mysql -e 'create database zftest;'
2526
- psql -c 'create database zftest;' -U postgres
2627

27-
- if [[ "$TRAVIS_PHP_VERSION" != "5.2" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-add tests/config.ini; fi
28+
- if [[ "$TRAVIS_PHP_VERSION" != "5.2" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]] && [[ "$TRAVIS_PHP_VERSION" != "7" ]]; then phpenv config-add tests/config.ini; fi
2829
- if [[ "$TRAVIS_PHP_VERSION" == "5.2" ]]; then phpenv config-add tests/php52_config.ini; fi
30+
- if [[ "$TRAVIS_PHP_VERSION" == "7" ]]; then phpenv config-add tests/php7_config.ini; fi
2931

3032
- cp ./tests/TestConfiguration.travis.php ./tests/TestConfiguration.php
3133

@@ -35,4 +37,5 @@ script:
3537

3638
matrix:
3739
allow_failures:
40+
- php: 7
3841
- php: hhvm

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
INFORMATION
22
===================
33

4-
This is a fork from Zend Framework 1.12.10 Release.
4+
This is a fork from Zend Framework 1.12.13 Release.
55

66
PURPOSE
77
---------------------------

documentation/manual/en/ref/requirements-dependencies-table.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
</entry>
119119
</row>
120120
<row>
121-
<entry morerows="4" valign="middle">&requirements.soft;</entry>
121+
<entry morerows="3" valign="middle">&requirements.soft;</entry>
122122
<entry>
123123
<ulink
124124
url="&zf.manual.link;/zend.db.html">

library/Zend/Amf/Server.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -767,9 +767,9 @@ public function setClass($class, $namespace = '', $argv = null)
767767
throw new Zend_Amf_Server_Exception('Invalid method or class; must be a classname or object');
768768
}
769769

770-
$argv = null;
770+
$args = null;
771771
if (2 < func_num_args()) {
772-
$argv = array_slice(func_get_args(), 2);
772+
$args = array_slice(func_get_args(), 2);
773773
}
774774

775775
// Use the class name as the name space by default.
@@ -780,7 +780,7 @@ public function setClass($class, $namespace = '', $argv = null)
780780

781781
$this->_classAllowed[is_object($class) ? get_class($class) : $class] = true;
782782

783-
$this->_methods[] = Zend_Server_Reflection::reflectClass($class, $argv, $namespace);
783+
$this->_methods[] = Zend_Server_Reflection::reflectClass($class, $args, $namespace);
784784
$this->_buildDispatchTable();
785785

786786
return $this;

library/Zend/Application.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,17 @@ class Zend_Application
7070
*
7171
* @param string $environment
7272
* @param string|array|Zend_Config $options String path to configuration file, or array/Zend_Config of configuration options
73+
* @param bool $suppressNotFoundWarnings Should warnings be suppressed when a file is not found during autoloading?
7374
* @throws Zend_Application_Exception When invalid options are provided
7475
* @return void
7576
*/
76-
public function __construct($environment, $options = null)
77+
public function __construct($environment, $options = null, $suppressNotFoundWarnings = null)
7778
{
7879
$this->_environment = (string) $environment;
7980

8081
#require_once 'Zend/Loader/Autoloader.php';
8182
$this->_autoloader = Zend_Loader_Autoloader::getInstance();
83+
$this->_autoloader->suppressNotFoundWarnings($suppressNotFoundWarnings);
8284

8385
if (null !== $options) {
8486
if (is_string($options)) {

library/Zend/Controller/Action/Helper/Redirector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ public function gotoSimpleAndExit($action, $controller = null, $module = null, a
406406
/**
407407
* Redirect to a route-based URL
408408
*
409-
* Uses route's assemble method tobuild the URL; route is specified by $name;
409+
* Uses route's assemble method to build the URL; route is specified by $name;
410410
* default route is used if none provided.
411411
*
412412
* @param array $urlOptions Array of key/value pairs used to assemble URL
@@ -427,7 +427,7 @@ public function gotoRoute(array $urlOptions = array(), $name = null, $reset = fa
427427
/**
428428
* Redirect to a route-based URL, and immediately exit
429429
*
430-
* Uses route's assemble method tobuild the URL; route is specified by $name;
430+
* Uses route's assemble method to build the URL; route is specified by $name;
431431
* default route is used if none provided.
432432
*
433433
* @param array $urlOptions Array of key/value pairs used to assemble URL

library/Zend/Controller/Action/Helper/ViewRenderer.php

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -841,13 +841,21 @@ protected function _translateSpec(array $vars = array())
841841
$inflector = $this->getInflector();
842842
$request = $this->getRequest();
843843
$dispatcher = $this->getFrontController()->getDispatcher();
844-
$module = $dispatcher->formatModuleName($request->getModuleName());
845-
$controller = substr(
846-
$dispatcher->formatControllerName($request->getControllerName()),
847-
0,
848-
-10
849-
);
850-
$action = $dispatcher->formatActionName($request->getActionName());
844+
845+
// Format module name
846+
$module = $dispatcher->formatModuleName($request->getModuleName());
847+
848+
// Format controller name
849+
require_once 'Zend/Filter/Word/CamelCaseToDash.php';
850+
$filter = new Zend_Filter_Word_CamelCaseToDash();
851+
$controller = $filter->filter($request->getControllerName());
852+
$controller = $dispatcher->formatControllerName($controller);
853+
if ('Controller' == substr($controller, -10)) {
854+
$controller = substr($controller, 0, -10);
855+
}
856+
857+
// Format action name
858+
$action = $dispatcher->formatActionName($request->getActionName());
851859

852860
$params = compact('module', 'controller', 'action');
853861
foreach ($vars as $key => $value) {

library/Zend/Controller/Request/Http.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,20 @@ public function isOptions()
917917
return false;
918918
}
919919

920+
/**
921+
* Was the request made by PATCH?
922+
*
923+
* @return boolean
924+
*/
925+
public function isPatch()
926+
{
927+
if ('PATCH' == $this->getMethod()) {
928+
return true;
929+
}
930+
931+
return false;
932+
}
933+
920934
/**
921935
* Is the request a Javascript XMLHttpRequest?
922936
*

library/Zend/Controller/Request/HttpTestCase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class Zend_Controller_Request_HttpTestCase extends Zend_Controller_Request_Http
6262
'GET',
6363
'HEAD',
6464
'OPTIONS',
65+
'PATCH',
6566
'POST',
6667
'PUT',
6768
);

library/Zend/Controller/Router/Route/Chain.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ public function chain(Zend_Controller_Router_Route_Abstract $route, $separator =
8686
*/
8787
public function match($request, $partial = null)
8888
{
89+
$rawPath = $request->getPathInfo();
8990
$path = trim($request->getPathInfo(), self::URI_DELIMITER);
9091
$subPath = $path;
9192
$values = array();
92-
$numRoutes = count($this->_routes);
9393
$matchedPath = null;
9494

9595
foreach ($this->_routes as $key => $route) {
@@ -101,12 +101,12 @@ public function match($request, $partial = null)
101101
$separator = substr($subPath, 0, strlen($this->_separators[$key]));
102102

103103
if ($separator !== $this->_separators[$key]) {
104+
$request->setPathInfo($rawPath);
104105
return false;
105106
}
106107

107108
$subPath = substr($subPath, strlen($separator));
108109
}
109-
110110
// TODO: Should be an interface method. Hack for 1.0 BC
111111
if (!method_exists($route, 'getVersion') || $route->getVersion() == 1) {
112112
$match = $subPath;
@@ -115,16 +115,17 @@ public function match($request, $partial = null)
115115
$match = $request;
116116
}
117117

118-
$res = $route->match($match, true, ($key == $numRoutes - 1));
118+
$res = $route->match($match, true);
119+
119120
if ($res === false) {
121+
$request->setPathInfo($rawPath);
120122
return false;
121123
}
122124

123125
$matchedPath = $route->getMatchedPath();
124126

125127
if ($matchedPath !== null) {
126128
$subPath = substr($subPath, strlen($matchedPath));
127-
$separator = substr($subPath, 0, strlen($this->_separators[$key]));
128129
}
129130

130131
$values = $res + $values;

0 commit comments

Comments
 (0)