Plugin Directory

Changeset 1811454


Ignore:
Timestamp:
01/29/2018 09:17:04 PM (8 years ago)
Author:
postpostmodern
Message:

fix create_function for 7.2 deprecated

Location:
dbug/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • dbug/trunk/README.md

    r1705800 r1811454  
    44Tags: debug, error log
    55Requires at least: 4.0
    6 Tested up to: 4.8
     6Tested up to: 4.9.2
    77Stable tag: trunk
    88
     
    2323
    2424== Changelog ==
     25= 1.9.8 =
     26change create_function for php >= 7.2
     27
    2528= 1.9.5 =
    2629require php 5.4
  • dbug/trunk/_plugin.php

    r1768540 r1811454  
    88Plugin URI:     https://github.com/pinecone-dot-website/dbug
    99Text Domain:   
    10 Version:        1.9.7
     10Version:        1.9.8
    1111
    1212This file must be parsable by php 5.2
    1313*/
    1414
    15 register_activation_hook( __FILE__, create_function("", '$ver = "5.4"; if( version_compare(phpversion(), $ver, "<") ) die( "This plugin requires PHP version $ver or greater be installed." );') );
    16 
    17 require __DIR__.'/index.php';
     15if (version_compare(phpversion(), '5.4', "<")) {
     16    add_action('admin_notices', create_function("", 'function(){
     17        echo "<div class=\"notice notice-success is-dismissible\">
     18                <p>Dbug requires PHP 5.4 or greater</p>
     19              </div>";
     20    };'));
     21} else {
     22    require __DIR__.'/index.php';
     23}
  • dbug/trunk/vendor/composer/ClassLoader.php

    r1768540 r1811454  
    380380                $search = $subPath.'\\';
    381381                if (isset($this->prefixDirsPsr4[$search])) {
     382                    $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
    382383                    foreach ($this->prefixDirsPsr4[$search] as $dir) {
    383                         $length = $this->prefixLengthsPsr4[$first][$search];
    384                         if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
     384                        if (file_exists($file = $dir . $pathEnd)) {
    385385                            return $file;
    386386                        }
Note: See TracChangeset for help on using the changeset viewer.