Skip to content

Commit

Permalink
Updating to 5.4 strict
Browse files Browse the repository at this point in the history
  • Loading branch information
webtechnick committed Aug 31, 2013
1 parent 765b7ac commit 9048bce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Model/DatabaseLoggerAppModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function delete($id = null, $cascade = true) {
* - last : find last record by created date
* @param array of options
*/
function find($type, $options = array()){
function find($type = 'first', $options = array()){
switch($type){
case 'last':
$options = array_merge(
Expand All @@ -69,7 +69,7 @@ function find($type, $options = array()){
* @param string filter
* @return conditions array
*/
function generateFilterConditions($filter = null){
function generateFilterConditions($filter = NULL, $pre = ''){
$retval = array();
if($filter){
foreach($this->searchFields as $field){
Expand Down
4 changes: 2 additions & 2 deletions Model/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Log extends DatabaseLoggerAppModel {
var $displayField = 'type';
var $searchFields = array('Log.type');

function beforeSave(){
function beforeSave($options = array()){
$this->data[$this->alias]['ip'] = env('REMOTE_ADDR');
$this->data[$this->alias]['hostname'] = env('HTTP_HOST');
$this->data[$this->alias]['uri'] = env('REQUEST_URI');
Expand Down Expand Up @@ -54,7 +54,7 @@ function getTypes(){
return $retval;
}

function search($params){
function search($params = array(), $options = array()){
$conditions = parent::search($params);
if(isset($params['start_date']) && !empty($params['start_date'])){
$params['start_date'] = str_replace('-','/',$params['start_date']);
Expand Down
2 changes: 1 addition & 1 deletion Test/Case/controllers/LogsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function redirect($url, $status = null, $exit = true) {

class LogsControllerTest extends CakeTestCase {
function startTest() {
$this->Logs =& new TestLogsController();
$this->Logs = new TestLogsController();
$this->Logs->constructClasses();
}

Expand Down

0 comments on commit 9048bce

Please sign in to comment.