Skip to content

Commit

Permalink
Criterion9 php8 dynamic attributes and other similar php version chan…
Browse files Browse the repository at this point in the history
…ge issues (#903)

* Update error.php attribute typo

logger attribute was typo as loggger

* Update module.php

* Update module.php

moving the declaration to the parent class where it belongs

* Update owa_module.php missed attribute declaration

* Update owa_metric.php missed attribute declarations

added type, entity, and all_columns attributes

* Update owa_auth.php missed attribute declaration

added eq

* Update owa_coreAPI.php optional parameter wrong order

removed "optional" parameter that had a required parameter after it

* Update state.php optional parameter order

removed "optional" parameter that had a required parameter afterwards

* Update owa_template.php missed attribute declaration

added time_now

* Update owa_template.php check for null parameter

added a check for null parameter and set to a string before using in strtolower()

* Update report.php missed attribute declaration

added report_params

* Update owa_view.php method mismatch

fixes the Fatal error: Declaration of owa_optionsGeneralView::render($data) must be compatible with message
  • Loading branch information
criterion9 committed Jan 7, 2024
1 parent ed125da commit 898236b
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 16 deletions.
4 changes: 2 additions & 2 deletions modules/base/classes/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class owa_error {
*
* @var array
*/
var $loggger;
var $logger;

/**
* Buffered Msgs
Expand Down Expand Up @@ -426,4 +426,4 @@ function mailErrorMsg( $msg, $subject ) {
}
}

?>
?>
6 changes: 3 additions & 3 deletions modules/base/classes/state.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function get($store, $name = '') {
}
}

function setState($store, $name = '', $value, $store_type = '', $is_perminent = false) {
function setState($store, $name, $value, $store_type = '', $is_perminent = false) {

owa_coreAPI::debug(sprintf('populating state for store: %s, name: %s, value: %s, store type: %s, is_perm: %s', $store, $name, print_r($value, true), $store_type, $is_perminent));

Expand Down Expand Up @@ -141,7 +141,7 @@ function isCdhRequired($store_name) {
}
}

function set($store, $name = '', $value, $store_type = '', $is_perminent = false) {
function set($store, $name, $value, $store_type = '', $is_perminent = false) {

if ( ! isset($this->stores[$store] ) ) {
$this->loadState($store);
Expand Down Expand Up @@ -318,4 +318,4 @@ function getCookieDomainHash($domain = '') {
}
}

?>
?>
2 changes: 1 addition & 1 deletion modules/base/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -2415,4 +2415,4 @@ function checkEventForType( $event ) {
}


?>
?>
3 changes: 2 additions & 1 deletion modules/base/report.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
*/

class owa_reportView extends owa_view {
var $report_params;

function render($data) {

Expand Down Expand Up @@ -258,4 +259,4 @@ function render() {
}
}

?>
?>
4 changes: 3 additions & 1 deletion owa_auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ class owa_auth extends owa_base {

var $auth_method;

var $eq;

/**
* Auth class Singleton
*
Expand Down Expand Up @@ -578,4 +580,4 @@ public function getAuthMethod() {
}
}

?>
?>
4 changes: 2 additions & 2 deletions owa_coreAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ public static function registerStateStore($name, $expiration, $length = '', $for
return $service->request->state->registerStore( $name, $expiration, $length, $format, $type, $cdh_required );
}

public static function setState($store, $name = '', $value, $store_type = '', $is_perminent = '') {
public static function setState($store, $name, $value, $store_type = '', $is_perminent = '') {

$service = owa_coreAPI::serviceSingleton();
return $service->request->state->set($store, $name, $value, $store_type, $is_perminent);
Expand Down Expand Up @@ -1936,4 +1936,4 @@ public static function signRequestUrl( $url, $apiKey ) {

}

?>
?>
4 changes: 3 additions & 1 deletion owa_metric.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ class owa_metric extends owa_base {
var $name;

var $supported_data_types = array('percentage', 'decimal', 'integer', 'url', 'yyyymmdd', 'timestamp', 'string', 'currency');

var $type, $entity, $all_columns;

function __construct($params = array()) {

Expand Down Expand Up @@ -360,4 +362,4 @@ function setMetricType( $type ) {
}
}

?>
?>
5 changes: 3 additions & 2 deletions owa_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ abstract class owa_module {
* Filesystem path of the module's directory
*/
var $path;


var $config_required;

/**
* Constructor
Expand Down Expand Up @@ -1197,4 +1198,4 @@ protected function registerEventQueue( $name, $map ) {

}

?>
?>
7 changes: 6 additions & 1 deletion owa_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class owa_template extends Template {

var $period;

var $time_now;

/**
* Params passed by calling caller
*
Expand Down Expand Up @@ -199,6 +201,9 @@ function get_month_label($month) {
* @return unknown
*/
function choose_browser_icon($browser_type) {
if(is_null($browser_type)){
$browser_type = 'null';
}

$bicons = [

Expand Down Expand Up @@ -1060,4 +1065,4 @@ public function isValueSet( $string ) {
}


?>
?>
4 changes: 2 additions & 2 deletions owa_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ function render() {

class owa_adminPageView extends owa_view {

function render() {
function render($data) {

// Set Page title
$this->t->set('page_title', $this->get('title'));
Expand Down Expand Up @@ -970,4 +970,4 @@ function setResponseData( $data ) {
}
}

?>
?>

0 comments on commit 898236b

Please sign in to comment.