Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for php 8.3 #510

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 21 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions application/core/MY_Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ class MY_Model extends CI_Model {
*/
public function __construct()
{
parent::__construct();
tenzap marked this conversation as resolved.
Show resolved Hide resolved

set_error_handler(function($errno, $errstr, $errfile, $errline) {
throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
});
Expand Down
2 changes: 1 addition & 1 deletion application/plugins/Plugin_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function __construct($login = TRUE)
$this->plugin_name = strtolower(get_class($this));

// Prevent this controller from being called directly
if (get_class() === get_class($this))
if ("Plugin_controller" === get_class($this))
Copy link
Collaborator

@tenzap tenzap Feb 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using __CLASS__ instead? Any advantage of it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works too. i have changed it

{
redirect(site_url('/'), 'location', 301);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class Blacklist_number_model extends CI_Model {

function __construct()
{
parent::__construct();
$this->load->helper('kalkun');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class Server_alert_model extends CI_Model {

function __construct()
{
parent::__construct();
$this->load->helper('kalkun');
}

Expand Down
1 change: 0 additions & 1 deletion application/plugins/sms_credit/models/Sms_credit_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class Sms_credit_model extends CI_Model {
*/
function __construct()
{
parent::__construct();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, and a few others, it seems it is advised to remove the constructor completely. See comment here: https://github.com/bcit-ci/CodeIgniter/blob/develop/user_guide_src/source/installation/upgrade_320.rst#step-3-remove-calls-to-ci_model__construct
There are other similar ones below.

}

// --------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion application/plugins/sms_member/models/Sms_member_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class Sms_member_model extends CI_Model {
*/
function __construct()
{
parent::__construct();
}

// --------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class Sms_to_email_model extends CI_Model {

function __construct()
{
parent::__construct();
}

function get_setting($uid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class Sms_to_twitter_model extends CI_Model {

function __construct()
{
parent::__construct();
}

function check_token($uid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class Sms_to_wordpress_model extends CI_Model
{
function __construct()
{
parent::__construct();
}

function check_status($uid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class Sms_to_xmpp_model extends CI_Model {

function __construct()
{
parent::__construct();
}

function check_status($uid)
Expand Down
1 change: 0 additions & 1 deletion application/plugins/soap/models/Api_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

function Plugin_model()
{
parent::__construct();
$this->load->library('Remote_Messages');
}

Expand Down
1 change: 0 additions & 1 deletion application/plugins/soap/models/Soap_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

function __construct()
{
parent::__construct();
}

function getRemoteAccess($option = NULL, $limit = NULL, $offset = NULL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class Stop_manager_model extends CI_Model {

function __construct()
{
parent::__construct();
}

function get($option = NULL, $limit = NULL, $offset = NULL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class Whitelist_number_model extends CI_Model {

function __construct()
{
parent::__construct();
}

function get($option = NULL, $limit = NULL, $offset = NULL)
Expand Down