2013-04-06 6 views
0

다음과 같은 증상을 제공합니다CakePHP의 1.2.x와는

  1. 파비콘은 소스에서 인쇄되지 않습니다.
  2. 다음 경고가 생성된다

    경고 (2) : array_merge() [function.array 병합] 인수 2 배열 [ROOT \에서의 CakePHP \ 케이크 \ libs와 \ router.php 아니다 (2) 경고 라인 754]

    :) (추출 파라미터 1 널 ROOT의 \의 CakePHP \ 케이크 [주어진 배열 될 예정 \ libs와 \ router.php, 라인 (754)]

    고지 (8) : 미정 변수 : escape [ROOT \ cakephp \ cake \ libs \ router.php, 930 행]

이러한 경고 및 통지 언급의 모든 :

[주] - APP \ 웹 루트 \ index.php를 라인 87

해당 파일의 87 다음 코드

if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') { 
     return; 
    } else { 
     $Dispatcher = new Dispatcher(); 
     $Dispatcher->dispatch($url);//This is line 87 
    } 
    if (Configure::read() > 0) { 
     echo "<!-- " . round(getMicrotime() - $TIME_START, 4) . "s -->"; 
    } 
//Here is the end of the file APP\webroot\index.php 
?> 
에 선

내 응용 프로그램에는 응용 프로그램 디렉토리에서 CakePHP 라이브러리가 포함되어 있습니다. 즉 모든 앱에 대해 하나의 케이크가 필요합니다.

테마가없는보기로 전환하면이 경고가 모두 사라집니다. 내가 왜 그 경고를 받았는지 궁금해? 어떻게 해결할 수 있을까요?

답변

0

이 오류는 $ html-> url() 메소드를 잘못 호출 한 것으로 나타났습니다. $ this-> url ('/ img/logo.png', "full")이라고했지만, $ html-> url ('/ img/logo.png', true)이어야합니다.

호출은 head.ctp라는 요소 파일에서 수행되었습니다. 다음은 전체 경연 대회 경고 설명입니다.

array_merge - [internal], line ?? 
Router::url() - ROOT\cakephp\cake\libs\router.php, line 754 
Helper::url() - ROOT\cakephp\cake\libs\view\helper.php, line 177 
include - APP\views\themed\slate\elements\head.ctp, line 15 //HERE IS THE Mistaken Call 
View::_render() - ROOT\cakephp\cake\libs\view\view.php, line 665 
View::element() - ROOT\cakephp\cake\libs\view\view.php, line 342 
include - APP\views\themed\slate\layouts\blog.ctp, line 1 
View::_render() - ROOT\cakephp\cake\libs\view\view.php, line 665 
View::renderLayout() - ROOT\cakephp\cake\libs\view\view.php, line 453 
View::render() - ROOT\cakephp\cake\libs\view\view.php, line 387 
Controller::render() - ROOT\cakephp\cake\libs\controller\controller.php, line 808 
Dispatcher::_invoke() - ROOT\cakephp\cake\dispatcher.php, line 229 
Dispatcher::dispatch() - ROOT\cakephp\cake\dispatcher.php, line 193 
[main] - APP\webroot\index.php, line 88 
Warning (2): extract() expects parameter 1 to be array, null given [ROOT\cakephp\cake\libs\router.php, line 754] 
Notice (8): Undefined variable: escape [ROOT\cakephp\cake\libs\router.php, line 930