Uncaught TypeError: Engine\Snippets\Snippet::exec(): Argument #1 ($variables) must be of type array, null given, called in /var/www/project/support/bug_report/index.content.payload.php on line 133 and defined in /home/www-master/www/vhosts/htdocs/core.moonlite13.ru/Modules/Engine/classes/Snippets/Snippet.php:317 Stack trace: #0 /var/www/project/support/bug_report/index.content.payload.php(133): Engine\Snippets\Snippet->exec(NULL) #1 /var/www/project/support/bug_report/index.content.php(53): include('/var/www/projec...') #2 /home/www-master/www/vhosts/htdocs/core.moonlite13.ru/Modules/Engine/classes/Gears.php(1306): include('/var/www/projec...') #3 /home/www-master/www/vhosts/htdocs/core.moonlite13.ru/Modules/Engine/classes/Application.php(4018): Engine\Gears->processRequestInStaticDirectoryMode() #4 /var/www/project/index.2019.php(671): Engine\Application->dispatchRequest(Array) #5 /var/www/project/index.php(4): require('/var/www/projec...') #6 /var/www/project/support/bug_report/index.php(34): require_once('/var/www/projec...') #7 /var/www/project/router.php(174): include('/var/www/projec...') #8 {main} thrown] в файле [/home/www-master/www/vhosts/htdocs/core.moonlite13.ru/Modules/Engine/classes/Snippets/Snippet.php] в строке [317]
00313: |
|
00314: |
|
00315: |
|
00316: |
|
00317: | public function &exec(array &$variables = array(), array $SnippetParams = []) : ?string |
00318: |
|
00319: |
|
00320: |
|
00321: |
|
00322: |
|
00323: |
|
<?php
/**
* In the Name of You
*
* пожалуйста, верните нам друг друга...
*
*
* @author Premier13 (Черных Александр) <alex@sensei.su>
* @author Tisha (Черных Тиша) <tisha@sensei.su>
* @copyright Sensei Media Concept(C) 2005-2022
*/
declare(strict_types=1);
namespace Engine\Snippets;
/**
*
*
*
* @category Core
* @package Engine\Snippets
* @author Premier13 (Черных Александр) <alex@sensei.su>
* @author Tisha (Черных Тиша) <tisha@sensei.su>
* @copyright Sensei Media Concept(C) 2005-2022
*/
class Snippet
//extends \SMC\JSON\Schematic\ComplexSerializableObject
{
//use \StaticallyInstantiable;
/**
*
* @var string
*/
CONST METADATA_FORMAT_PHP = "PHP";
CONST METADATA_FORMAT_PHP_VAR_EXPORT = "var_export";
CONST METADATA_FORMAT_JSON = "JSON";
CONST METADATA_FILENAME_EXTENSION_FORMAT_PHP = ".metadata.php";
CONST METADATA_FILENAME_EXTENSION_FORMAT_PHP_VAR_EXPORT = ".metadata.php";
CONST METADATA_FILENAME_EXTENSION_FORMAT_JSON = ".metadata.json";
/**
* .snippet.metadata.php
*
* @var string
*/
CONST METADATA_FILENAME_PHP = ".metadata.php";
/**
* .section.metadata.json
*
* @var string
*/
CONST METADATA_FILENAME_JSON = ".metadata.json";
/**
*
* @var string
*/
const INCLUDE_FILE = "index.phtml";
/**
*
* @var string
*/
const METADATA_FILE = ".metadata.php";
/**
*
* @var string
*/
public ?string $id;
/**
*
* @var string|NULL
*/
public ?string $name;
/**
*
* @var string|NULL
*/
public ?string $fullname;
/**
*
* @var string|NULL
*/
public ?string $fullpath;
/**
*
*/
public function __construct($id = NULL, $path = NULL, $realpath = NULL, $location = NULL)
{
//
//$this->realpath = $id;
$this->id = $id;
//$this->path = $path;
//$this->realpath = $realpath;
//$this->location = $location;
//
}
/**
*
* @param string $fullpath
* @param string $fullname
* @return self
*/
public function &init(?string $fullpath, ?string $fullname = NULL)
{
if(1)
{
$fullpath = str_replace("//", "/", $fullpath);
}
//
$this->fullpath = $fullpath;
//
$this->fullname = $fullname;
//
return $this;
}
/**
*
* @return string
*/
public function getName() : ?string
{
$result = NULL;
//
$result = $this->name;
//
return $result;
}
/**
*
* @return string
*/
public function getFullName() : ?string
{
$result = NULL;
//
$result = $this->fullname;
//
return $result;
}
/**
*
* @return bool|NULL
*/
public function hasMetadata() : ?bool
{
return file_exists($this->fullpath."/".static::METADATA_FILE);
}
/**
*
* @return array|NULL
*/
public function getMetadata() : ?array
{
$result = NULL;
//
if(file_exists($this->fullpath."/".static::METADATA_FILE))
{
//$result = \System::isolated_include($this->fullpath."/".static::METADATA_FILE);
//
$result = include($this->fullpath."/".static::METADATA_FILE);
}
//
return $result;
}
/**
*
* @return string
*/
public function getFullPath() : ?string
{
$result = NULL;
//
$result = $this->fullpath;
//
return $result;
}
/**
*
* @return string
*/
public function getIncludeFilePath() : ?string
{
$result = NULL;
//
$result = $this->fullpath."/".static::INCLUDE_FILE;
//
return $result;
}
/**
*
* @param string|NULL $name
* @return string
*/
/**
*
* @param string|NULL $name
* @param boolean $check
* @return string|NULL
*/
public function getFilePath(?string $name = NULL, ?bool $check = true) : ?string
{
$result = NULL;
//
if($name === NULL)
{
$name = static::INCLUDE_FILE;
}
//
$path = $this->fullpath."/".$name;
//
if($check)
{
if(file_exists($path))
{
$result = $path;
}
}
else
{
$result = $pat