Skip to content

Commit

Permalink
Merge pull request #10467 from mhcwebdesign/3.0.x.x_Maintenance
Browse files Browse the repository at this point in the history
PHP 8.x support for 3.0.x.x maintenance branch (09-03-2022)
  • Loading branch information
mhcwebdesign committed Apr 30, 2022
2 parents 9a5f6ae + a5f27d0 commit bda229a
Show file tree
Hide file tree
Showing 1,795 changed files with 172,026 additions and 15,301 deletions.
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -15,7 +15,7 @@
"klarna/kco_rest": "^2.2",
"php": ">=5.4.0",
"scssphp/scssphp": "1.1.1",
"twig/twig": "^2.4.8",
"zoujingli/wechat-php-sdk": ">=1.3.10"
"zoujingli/wechat-php-sdk": ">=1.3.10",
"twig/twig": "^3.0"
}
}
39 changes: 14 additions & 25 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion upload/admin/model/extension/dashboard/sale.php
Expand Up @@ -9,7 +9,7 @@ public function getTotalSales($data = array()) {

$query = $this->db->query($sql);

return $query->row['total'];
return isset($query->row['total']) ? $query->row['total'] : 0.00;
}

public function getTotalOrdersByCountry() {
Expand Down
12 changes: 12 additions & 0 deletions upload/catalog/controller/startup/startup.php
@@ -1,5 +1,17 @@
<?php
class ControllerStartupStartup extends Controller {

public function __isset($key) {
// To make sure that calls to isset also support dynamic properties from the registry
// See https://www.php.net/manual/en/language.oop5.overloading.php#object.isset
if ($this->registry) {
if ($this->registry->get($key)!==null) {
return true;
}
}
return false;
}

public function index() {
// Store
if ($this->request->server['HTTPS']) {
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/model/catalog/product.php
Expand Up @@ -42,7 +42,7 @@ public function getProduct($product_id) {
'height' => $query->row['height'],
'length_class_id' => $query->row['length_class_id'],
'subtract' => $query->row['subtract'],
'rating' => round($query->row['rating']),
'rating' => round(($query->row['rating']===null) ? 0 : $query->row['rating']),
'reviews' => $query->row['reviews'] ? $query->row['reviews'] : 0,
'minimum' => $query->row['minimum'],
'sort_order' => $query->row['sort_order'],
Expand Down
2 changes: 1 addition & 1 deletion upload/system/library/db/mysqli.php
Expand Up @@ -50,7 +50,7 @@ public function query($sql) {
}

public function escape($value) {
return $this->connection->real_escape_string($value);
return $this->connection->real_escape_string(($value===null) ? '' : $value);
}

public function countAffected() {
Expand Down
2 changes: 1 addition & 1 deletion upload/system/storage/vendor/autoload.php
Expand Up @@ -4,4 +4,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInita8cb75283b86ff94542c6f1327c4ce59::getLoader();
return ComposerAutoloaderInit739b8c4876316c3496b6b4e434ec69a5::getLoader();
105 changes: 94 additions & 11 deletions upload/system/storage/vendor/bin/pscss 100644 → 100755
@@ -1,14 +1,97 @@
#!/usr/bin/env sh
#!/usr/bin/env php
<?php

dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../scssphp/scssphp/bin" && pwd)
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../scssphp/scssphp/bin/pscss)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/

if [ -d /proc/cygdrive ]; then
case $(which php) in
$(readlink -n /proc/cygdrive)/*)
# We are in Cygwin using Windows php, so the path must be translated
dir=$(cygpath -m "$dir");
;;
esac
fi
namespace Composer;

"${dir}/pscss" "$@"
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';

if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;

public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of composer-bin-proxy:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 21);
$opened_path = realpath($opened_path) ?: $opened_path;
$this->handle = fopen($opened_path, $mode);
$this->position = 0;

// remove all traces of this stream wrapper once it has been used
stream_wrapper_unregister('composer-bin-proxy');

return (bool) $this->handle;
}

public function stream_read($count)
{
$data = fread($this->handle, $count);

if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}

$this->position += strlen($data);

return $data;
}

public function stream_cast($castAs)
{
return $this->handle;
}

public function stream_close()
{
fclose($this->handle);
}

public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}

public function stream_tell()
{
return $this->position;
}

public function stream_eof()
{
return feof($this->handle);
}

public function stream_stat()
{
return fstat($this->handle);
}

public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
}
}

if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) {
include("composer-bin-proxy://" . __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss');
exit(0);
}
}

include __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss';
4 changes: 0 additions & 4 deletions upload/system/storage/vendor/bin/pscss.bat

This file was deleted.

1 change: 0 additions & 1 deletion upload/system/storage/vendor/braintree/braintree_php
Submodule braintree_php deleted from c7e0e2
@@ -0,0 +1,9 @@
### General information

* SDK/Library version: <!-- Example: 4.7.2 -->
* Environment: <!-- Is this issue in Sandbox or Production? -->
* Language, language version, and OS: <!-- Example: Java 1.8.0_101-b13 on Ubuntu 16.10 -->

### Issue description

<!-- To help us quickly reproduce your issue, include as many details as possible, such as logs, steps to reproduce, and so on. If the issue reports a new feature, follow the [user story](https://en.wikipedia.org/wiki/User_story) format to clearly describe the use case. -->
@@ -0,0 +1,6 @@
# Summary

# Checklist

- [ ] Added changelog entry
- [ ] Ran unit tests (Check the README for instructions)
@@ -0,0 +1,7 @@
/vendor
/docs
/tags
composer.lock
composer.phar
*.tgz
tests/fixtures/large_file.png
@@ -0,0 +1,6 @@
Acknowledgements
----------------

The Braintree SDK uses code from the following libraries:

* [phpunit](https://github.com/sebastianbergmann/phpunit), BSD-3-Clause License

0 comments on commit bda229a

Please sign in to comment.