Plugin Directory

Changeset 2891808


Ignore:
Timestamp:
04/01/2023 12:43:48 PM (3 years ago)
Author:
keystrokeclick
Message:

Fix: Problem in Users admin page

Location:
protect-admin-account/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • protect-admin-account/trunk/freemius/includes/class-fs-api.php

    r2886597 r2891808  
    372372         * @param array  $remote_args
    373373         *
    374          * @return mixed
     374         * @return array|WP_Error The response array or a WP_Error on failure.
    375375         */
    376376        static function remote_request( $url, $remote_args ) {
     
    387387
    388388            if (
    389                 empty( $response['headers'] ) ||
    390                 empty( $response['headers']['x-api-server'] )
     389                is_array( $response ) &&
     390                (
     391                    empty( $response['headers'] ) ||
     392                    empty( $response['headers']['x-api-server'] )
     393                )
    391394            ) {
    392395                // API is considered blocked if the response doesn't include the `x-api-server` header. When there's no error but this header doesn't exist, the response is usually not in the expected form (e.g., cannot be JSON-decoded).
  • protect-admin-account/trunk/freemius/includes/sdk/FreemiusWordPress.php

    r2886597 r2891808  
    349349         * @param array  $pWPRemoteArgs
    350350         *
    351          * @return mixed
     351         * @return array|WP_Error The response array or a WP_Error on failure.
    352352         */
    353353        static function RemoteRequest( $pUrl, $pWPRemoteArgs ) {
     
    355355
    356356            if (
    357                 empty( $response['headers'] ) ||
    358                 empty( $response['headers']['x-api-server'] )
     357                is_array( $response ) &&
     358                (
     359                    empty( $response['headers'] ) ||
     360                    empty( $response['headers']['x-api-server'] )
     361                )
    359362            ) {
    360363                // API is considered blocked if the response doesn't include the `x-api-server` header. When there's no error but this header doesn't exist, the response is usually not in the expected form (e.g., cannot be JSON-decoded).
  • protect-admin-account/trunk/freemius/start.php

    r2886597 r2891808  
    1616     * @var string
    1717     */
    18     $this_sdk_version = '2.5.5';
     18    $this_sdk_version = '2.5.6';
    1919
    2020    #region SDK Selection Logic --------------------------------------------------------------------
  • protect-admin-account/trunk/includes/paa-filters.php

    r2807778 r2891808  
    88
    99        $thp_paa_options = get_option( 'thp_paa_options' );
    10         $protected_users = $thp_paa_options['protected_users'];
    11         if ( array_key_exists($user_object->id, $protected_users) && ($protected_users[$user_object->id] == '1')) {
     10        $protected_users = array_key_exists('protected_users', $thp_paa_options) ? $thp_paa_options['protected_users'] : '';
     11        if ( !empty( $protected_users ) && array_key_exists($user_object->ID, $protected_users) && ($protected_users[$user_object->ID] == '1')) {
    1212            $activator_id = thp_paa_get_activator_id();
    1313            $current_user = wp_get_current_user()->ID;
  • protect-admin-account/trunk/index.php

    r2886597 r2891808  
    44 * Plugin URI: https://protectadmin.com/plugin/protect-admin-account-pro-wordpress-plugin/
    55 * Description: Protect admin accounts from being deleted or modified by other users.
    6  * Version: 2.0.0
     6 * Version: 2.0.1
    77 * Author: Keystroke Click
    88 * Author URI: https://keystrokeclick.com/
  • protect-admin-account/trunk/readme.txt

    r2886605 r2891808  
    66Tested up to: 6.1.1
    77Requires PHP: 5.3
    8 Stable tag: 2.0.0
     8Stable tag: 2.0.1
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.txt
     
    100100== Changelog ==
    101101
     102= 2.0.1 =
     103* Fix: Problem in Users admin page when no configured protected users yet
     104
    102105= 2.0.0 =
    103106* Platform functionality integration
Note: See TracChangeset for help on using the changeset viewer.