Skip to content

Commit

Permalink
php 8.3 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lenochware committed Nov 11, 2024
1 parent 1c62b73 commit 701d5b6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pclib/FileStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function deleteFile($loc)
/** Upload new file into filesystem and create db record. */
protected function insertFile(array $loc, array $data)
{
if ($data['CONTENT']) {
if (isset($data['CONTENT'])) {
$data['FILEPATH_SRC'] = $this->createTempFile($data);
unset($data['CONTENT']);
$data['IS_TEMP'] = true;
Expand Down
2 changes: 1 addition & 1 deletion pclib/Tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ function print_Link($id, $sub, $value)
function print_Env($id, $sub, $value)
{
/* if (!$sub) print $_SERVER['QUERY_STRING']; else */
print $this->escapeHtmlFunction($_GET[$sub]);
print $this->escapeHtmlFunction($_GET[$sub] ?? '');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion pclib/extensions/TemplateFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected static function getElements($options, $columns)
$elements = array();

$getter = 'get'.ucfirst($options['create']).'Element';
if (!method_exists(get_class(), $getter)) {
if (!method_exists(static::class, $getter)) {
throw new Exception("Unknown method %s", array('TemplateFactory::'.$getter));
}

Expand Down
8 changes: 4 additions & 4 deletions pclib/extensions/TplGlobals.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ protected function addGlobalsModule(Tpl $t, $module = '')

$id = $var['id'];

if (isset($t->elements[$id])) {
throw new \pclib\Exception("Name conflict: global '$id'");
}
// if (isset($t->elements[$id])) {
// throw new \pclib\Exception("Name conflict: global '$id'");
// }

$t->addTag("global $id skip");
// $t->addTag("global $id skip");

$t->elements[$id]['onprint'] = function($o, $id, $sub, $value) use($module) {

Expand Down

0 comments on commit 701d5b6

Please sign in to comment.