mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
More fixes for PHP 8.0
This commit is contained in:
parent
5fa1321619
commit
f0c136c421
@ -57,7 +57,7 @@ class OTS_HousesList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
* @param array $properties List of object properties.
|
* @param array $properties List of object properties.
|
||||||
* @throws DOMException On DOM operation error.
|
* @throws DOMException On DOM operation error.
|
||||||
*/
|
*/
|
||||||
public function __set_state($properties)
|
public static function __set_state($properties)
|
||||||
{
|
{
|
||||||
$object = new self();
|
$object = new self();
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ class OTS_VocationsList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
* @param array $properties List of object properties.
|
* @param array $properties List of object properties.
|
||||||
* @throws DOMException On DOM operation error.
|
* @throws DOMException On DOM operation error.
|
||||||
*/
|
*/
|
||||||
public function __set_state($properties)
|
public static function __set_state($properties)
|
||||||
{
|
{
|
||||||
$object = new self();
|
$object = new self();
|
||||||
|
|
||||||
|
@ -1,85 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**#@+
|
|
||||||
* @version 0.0.2
|
|
||||||
* @since 0.0.2
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* POT compatibility assurance package.
|
|
||||||
*
|
|
||||||
* This package makes you sure that POT scripts won't cause FATAL errors on PHP older PHP 5.x versions. However remember that some PHP features won't be enabled with it. For example if you have PHP 5.0.x, this package will define Countable interface for you so PHP will know it, but it won't allow you to use count($countableObject) structure.
|
|
||||||
*
|
|
||||||
* Note that you need to include this file before any other POT file or they will cause FATAL errors.
|
|
||||||
*
|
|
||||||
* @package POT
|
|
||||||
* @version 0.1.2
|
|
||||||
* @subpackage compat
|
|
||||||
* @author Wrzasq <wrzasq@gmail.com>
|
|
||||||
* @copyright 2007 - 2008 (C) by Wrzasq
|
|
||||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt GNU Lesser General Public License, Version 3
|
|
||||||
* @tutorial POT/PHP_5.0.pkg
|
|
||||||
*/
|
|
||||||
|
|
||||||
// OutOfBoundsException class for 5.0.x
|
|
||||||
if( !class_exists('OutOfBoundsException') )
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
* @version 0.1.0
|
|
||||||
* @since 0.1.0
|
|
||||||
*/
|
|
||||||
class OutOfBoundsException extends Exception
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// LogicException class for 5.0.x
|
|
||||||
if( !class_exists('LogicException') )
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
* @version 0.1.2
|
|
||||||
* @since 0.1.2
|
|
||||||
*/
|
|
||||||
class LogicException extends Exception
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Countable for PHP 5.0.x
|
|
||||||
if( !interface_exists('Countable') )
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
interface Countable
|
|
||||||
{
|
|
||||||
public function count();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// spl_autoload_register() walkaround
|
|
||||||
if( !function_exists('spl_autoload_register') )
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
function spl_autoload_register($callback)
|
|
||||||
{
|
|
||||||
if( !function_exists('__autoload') )
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
function __autoload($class)
|
|
||||||
{
|
|
||||||
POT::getInstance()->loadClass($class);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**#@-*/
|
|
||||||
|
|
||||||
?>
|
|
Loading…
x
Reference in New Issue
Block a user