Plugin Directory

Changeset 3370516


Ignore:
Timestamp:
09/30/2025 02:02:33 PM (6 months ago)
Author:
fapi
Message:

Bug fix

Location:
fapi-member
Files:
415 added
5 edited

Legend:

Unmodified
Added
Removed
  • fapi-member/trunk/fapi-member.php

    r3336608 r3370516  
    1515 * Plugin URI:        https://fapi.cz/
    1616 * Description:       Plugin FAPI pro jednoduchou správu členských sekcí na webu.
    17  * Version:           2.2.24
     17 * Version:           2.2.25
    1818 * Requires at least: 5.9
    1919 * Requires PHP:      8.1
     
    3030require __DIR__ . '/src/Utils/functions.php';
    3131
    32 define('FAPI_MEMBER_PLUGIN_VERSION', '2.2.24');
     32define('FAPI_MEMBER_PLUGIN_VERSION', '2.2.25');
    3333
    3434$FapiPlugin = new FapiMemberPlugin();
  • fapi-member/trunk/readme.txt

    r3336608 r3370516  
    66Requires PHP: 8.1
    77License: GPLv2 or later
    8 Stable tag: 2.2.24
     8Stable tag: 2.2.25
    99
    1010Plugin FAPI pro jednoduchou správu členských sekcí na webu.
     
    2626
    2727== Changelog ==
     28
     29= 2.2.25 =
     30* Bug fix
    2831
    2932= 2.2.24 =
  • fapi-member/trunk/vendor/autoload.php

    r3294625 r3370516  
    1515        }
    1616    }
    17     trigger_error(
    18         $err,
    19         E_USER_ERROR
    20     );
     17    throw new RuntimeException($err);
    2118}
    2219
  • fapi-member/trunk/vendor/composer/InstalledVersions.php

    r3336608 r3370516  
    2828{
    2929    /**
     30     * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
     31     * @internal
     32     */
     33    private static $selfDir = null;
     34
     35    /**
    3036     * @var mixed[]|null
    3137     * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
    3238     */
    3339    private static $installed;
     40
     41    /**
     42     * @var bool
     43     */
     44    private static $installedIsLocalDir;
    3445
    3546    /**
     
    310321        self::$installed = $data;
    311322        self::$installedByVendor = array();
     323
     324        // when using reload, we disable the duplicate protection to ensure that self::$installed data is
     325        // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
     326        // so we have to assume it does not, and that may result in duplicate data being returned when listing
     327        // all installed packages for example
     328        self::$installedIsLocalDir = false;
     329    }
     330
     331    /**
     332     * @return string
     333     */
     334    private static function getSelfDir()
     335    {
     336        if (self::$selfDir === null) {
     337            self::$selfDir = strtr(__DIR__, '\\', '/');
     338        }
     339
     340        return self::$selfDir;
    312341    }
    313342
     
    323352
    324353        $installed = array();
     354        $copiedLocalDir = false;
    325355
    326356        if (self::$canGetVendors) {
     357            $selfDir = self::getSelfDir();
    327358            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
     359                $vendorDir = strtr($vendorDir, '\\', '/');
    328360                if (isset(self::$installedByVendor[$vendorDir])) {
    329361                    $installed[] = self::$installedByVendor[$vendorDir];
     
    331363                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
    332364                    $required = require $vendorDir.'/composer/installed.php';
    333                     $installed[] = self::$installedByVendor[$vendorDir] = $required;
    334                     if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    335                         self::$installed = $installed[count($installed) - 1];
     365                    self::$installedByVendor[$vendorDir] = $required;
     366                    $installed[] = $required;
     367                    if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
     368                        self::$installed = $required;
     369                        self::$installedIsLocalDir = true;
    336370                    }
     371                }
     372                if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
     373                    $copiedLocalDir = true;
    337374                }
    338375            }
     
    351388        }
    352389
    353         if (self::$installed !== array()) {
     390        if (self::$installed !== array() && !$copiedLocalDir) {
    354391            $installed[] = self::$installed;
    355392        }
  • fapi-member/trunk/vendor/composer/installed.php

    r3336608 r3370516  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '3da510a8204c5f87fdf2b6ffc4588a3281c85397',
     6        'reference' => '6bb7996ae018eb013dd5119301d7ccf33726635d',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '3da510a8204c5f87fdf2b6ffc4588a3281c85397',
     16            'reference' => '6bb7996ae018eb013dd5119301d7ccf33726635d',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.