Skip to content

Commit

Permalink
Merge pull request #2657 from pifou25/fix/notices
Browse files Browse the repository at this point in the history
fix deprecated notices
  • Loading branch information
zoic21 authored Jun 6, 2024
2 parents 7d58339 + ca52393 commit 4d7c6f3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion core/class/eqLogic.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,9 @@ public static function toHumanReadable($_input) {
}

public static function fromHumanReadable($_input) {
if(empty($_input)){
return $_input;
}
$isJson = false;
if (is_json($_input)) {
$isJson = true;
Expand Down Expand Up @@ -525,7 +528,7 @@ public static function fromHumanReadable($_input) {
return $_input;
}
$text = $_input;
preg_match_all("/#\[(.*?)\]\[(.*?)\]#/", $text, $matches);
preg_match_all( "/#\[(.*?)\]\[(.*?)\]#/", $text, $matches);
if (count($matches) == 3) {
$countMatches = count($matches[0]);
for ($i = 0; $i < $countMatches; $i++) {
Expand Down
3 changes: 3 additions & 0 deletions core/class/jeeObject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ public static function toHumanReadable($_input) {
}

public static function fromHumanReadable($_input) {
if(empty($_input)){
return $_input;
}
$isJson = false;
if (is_json($_input)) {
$isJson = true;
Expand Down
3 changes: 3 additions & 0 deletions core/class/scenario.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,9 @@ public static function toHumanReadable($_input) {
* @return string|object|array return value will depends on $_input received
*/
public static function fromHumanReadable($_input) {
if(empty($_input)){
return $_input;
}
$isJson = false;
if (is_json($_input)) {
$isJson = true;
Expand Down
2 changes: 1 addition & 1 deletion core/class/utils.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public static function encrypt($plaintext, $password = null) {
}

public static function decrypt($ciphertext, $password = null) {
if ($ciphertext === '') {
if (empty($ciphertext)) {
return null;
}
if ($password == null) {
Expand Down
2 changes: 1 addition & 1 deletion core/php/getResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $lastModified) . ' GMT');
header('Etag: ' . $etagFile);
header('Cache-Control: public');
if (@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $lastModified || $etagHeader == $etagFile) {
if (($ifModifiedSince !== false && $ifModifiedSince == $lastModified) || $etagHeader == $etagFile) {
header('HTTP/1.1 304 Not Modified');
exit;
}
Expand Down

0 comments on commit 4d7c6f3

Please sign in to comment.