mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing more strict warnings.
This commit is contained in:
parent
f84871ae47
commit
0ac8d04241
5 changed files with 10 additions and 10 deletions
|
@ -315,7 +315,8 @@ class Dispatcher {
|
||||||
$this->_stop();
|
$this->_stop();
|
||||||
}
|
}
|
||||||
$controller = null;
|
$controller = null;
|
||||||
$ext = array_pop(explode('.', $url));
|
$pathSegments = explode('.', $url);
|
||||||
|
$ext = array_pop($pathSegments);
|
||||||
$parts = explode('/', $url);
|
$parts = explode('/', $url);
|
||||||
$assetFile = null;
|
$assetFile = null;
|
||||||
|
|
||||||
|
|
|
@ -212,7 +212,7 @@ class File {
|
||||||
* @param string $data Data to prepare for writing.
|
* @param string $data Data to prepare for writing.
|
||||||
* @return string The with converted line endings.
|
* @return string The with converted line endings.
|
||||||
*/
|
*/
|
||||||
public function prepare($data, $forceWindows = false) {
|
public static function prepare($data, $forceWindows = false) {
|
||||||
$lineBreak = "\n";
|
$lineBreak = "\n";
|
||||||
if (DIRECTORY_SEPARATOR == '\\' || $forceWindows === true) {
|
if (DIRECTORY_SEPARATOR == '\\' || $forceWindows === true) {
|
||||||
$lineBreak = "\r\n";
|
$lineBreak = "\r\n";
|
||||||
|
|
|
@ -49,12 +49,11 @@ class TestDispatcher extends Dispatcher {
|
||||||
* invoke method
|
* invoke method
|
||||||
*
|
*
|
||||||
* @param mixed $controller
|
* @param mixed $controller
|
||||||
* @param mixed $params
|
* @param mixed $request
|
||||||
* @param mixed $missingAction
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function _invoke(&$controller, $params) {
|
protected function _invoke(Controller $controller, CakeRequest $request) {
|
||||||
if ($result = parent::_invoke($controller, $params)) {
|
if ($result = parent::_invoke($controller, $request)) {
|
||||||
if ($result[0] === 'missingAction') {
|
if ($result[0] === 'missingAction') {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
@ -192,7 +191,7 @@ class SomePagesController extends AppController {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function redirect() {
|
public function redirect($url, $status = null, $exit = true) {
|
||||||
echo 'this should not be accessible';
|
echo 'this should not be accessible';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,8 +195,8 @@ class FolderTest extends CakeTestCase {
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
|
|
||||||
$expected = $new . ' is a file';
|
$expected = $new . ' is a file';
|
||||||
$result = array_pop($Folder->errors());
|
$result = $Folder->errors();
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($result[0], $expected);
|
||||||
|
|
||||||
$new = TMP . 'test_folder_new';
|
$new = TMP . 'test_folder_new';
|
||||||
$result = $Folder->create($new);
|
$result = $Folder->create($new);
|
||||||
|
|
|
@ -2273,7 +2273,7 @@ class RouterTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testPatternOnAction() {
|
function testPatternOnAction() {
|
||||||
$route =& new CakeRoute(
|
$route = new CakeRoute(
|
||||||
'/blog/:action/*',
|
'/blog/:action/*',
|
||||||
array('controller' => 'blog_posts'),
|
array('controller' => 'blog_posts'),
|
||||||
array('action' => 'other|actions')
|
array('action' => 'other|actions')
|
||||||
|
|
Loading…
Reference in a new issue