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

Add fixes for PHP 8.2 #699

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
node_modules
wordpress
vendor
.vscode
5 changes: 4 additions & 1 deletion common/php/class-module.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

if ( !class_exists( 'EF_Module' ) ) {

#[\AllowDynamicProperties]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this attribute necessary since I see that the properties are later being defined?

class EF_Module {

public $published_statuses = array(
Expand All @@ -15,6 +16,8 @@ class EF_Module {
'private',
);

public $module_url;

function __construct() {}

/**
Expand Down Expand Up @@ -478,7 +481,7 @@ function users_select_form( $selected = null, $args = null ) {

<?php if( !empty($users) ) : ?>
<ul class="<?php echo esc_attr( $list_class ) ?>">
<?php foreach( $users as $user ) :
<?php foreach( $users as $user ) :
$checked = ( in_array($user->ID, $selected) ) ? 'checked="checked"' : '';
// Add a class to checkbox of current user so we know not to add them in notified list during notifiedMessage() js function
$current_user_class = ( get_current_user_id() == $user->ID ) ? 'class="post_following_list-current_user" ' : '';
Expand Down
20 changes: 20 additions & 0 deletions edit_flow.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function _ef_print_php_version_admin_notice() {
define( 'EDIT_FLOW_SETTINGS_PAGE' , add_query_arg( 'page', 'ef-settings', get_admin_url( null, 'admin.php' ) ) );

// Core class
#[\AllowDynamicProperties]
class edit_flow {

// Unique identified added as a prefix to all options
Expand All @@ -64,6 +65,25 @@ class edit_flow {
*/
private static $instance;

/**
* Active modules.
*
* @var \stdClass
*/
public $modules;

/**
* Number of active modules.
*
* @var int
*/
public $modules_count;

/**
* @var EF_Module
*/
public $helpers;

/**
* Main EditFlow Instance
*
Expand Down
Loading