diff --git a/modules/statsregistrations/statsregistrations.php b/modules/statsregistrations/statsregistrations.php
index 4e2deaa07..8c9c32c74 100644
--- a/modules/statsregistrations/statsregistrations.php
+++ b/modules/statsregistrations/statsregistrations.php
@@ -184,7 +184,11 @@ class StatsRegistrations extends ModuleGraph
{
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->query.$this->getDate());
foreach ($result as $row) {
- $this->_values[(int)Tools::substr($row['date_add'], 0, 4)]++;
+ $year = (int)Tools::substr($row['date_add'], 0, 4);
+ if (!isset($this->_values[$year])) {
+ $this->_values[$year] = 0;
+ }
+ $this->_values[$year]++;
}
}
@@ -204,7 +208,11 @@ class StatsRegistrations extends ModuleGraph
{
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->query.$this->getDate());
foreach ($result as $row) {
- $this->_values[(int)Tools::substr($row['date_add'], 8, 2)]++;
+ $days = (int)Tools::substr($row['date_add'], 8, 2);
+ if (!isset($this->_values[$days])) {
+ $this->_values[$days] = 0;
+ }
+ $this->_values[$days]++;
}
}
@@ -212,7 +220,11 @@ class StatsRegistrations extends ModuleGraph
{
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->query.$this->getDate());
foreach ($result as $row) {
- $this->_values[(int)Tools::substr($row['date_add'], 11, 2)]++;
+ $hour = (int)Tools::substr($row['date_add'], 11, 2);
+ if (!isset($this->_values[$hour])) {
+ $this->_values[$hour] = 0;
+ }
+ $this->_values[$hour]++;
}
}
}
diff --git a/themes/hotel-reservation-theme/_partials/room_type_list.tpl b/themes/hotel-reservation-theme/_partials/room_type_list.tpl
index 377a22ae1..aaa0f3ec0 100644
--- a/themes/hotel-reservation-theme/_partials/room_type_list.tpl
+++ b/themes/hotel-reservation-theme/_partials/room_type_list.tpl
@@ -42,7 +42,7 @@
{block name='room_type_list_room_quantity'}
-
{$room_v['name']|escape:'htmlall':'UTF-8'}
+
{$room_v['name']|escape:'htmlall':'UTF-8'}
{if !isset($restricted_country_mode) && !$PS_CATALOG_MODE && !$order_date_restrict}
$warning_num} style="display:none"{/if}>
{l s='Hurry!'} {$room_v['room_left']|escape:'htmlall':'UTF-8'} {l s='rooms left'}
diff --git a/tools/parser_sql/php_sql_parser_autoload.php b/tools/parser_sql/php_sql_parser_autoload.php
index 00b8625f4..a9bb9d3a0 100644
--- a/tools/parser_sql/php_sql_parser_autoload.php
+++ b/tools/parser_sql/php_sql_parser_autoload.php
@@ -30,7 +30,8 @@ function classAutoLoader($class)
return;
}
- $className = end(explode('\\', $class));
+ $parts = explode('\\', $class);
+ $className = end($parts);
if(class_exists($className)) {
return;
}