Skip to content

Commit 8d3b0e3

Browse files
Merge pull request #23 from alvinjohnsonso/fix/enable-visitor-recognition-undefined-property
Fixed property undefined when checking enable_visitor_recognition from options by changing how $options->enable_visitor_recognition was being checked. Used `isset` instead of `is_null`to properly check if the property was set
2 parents 6393c7b + 024f437 commit 8d3b0e3

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

prestashop1.6/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<module>
33
<name>tawkto</name>
44
<displayName><![CDATA[tawk.to]]></displayName>
5-
<version><![CDATA[1.2.1]]></version>
5+
<version><![CDATA[1.2.2]]></version>
66
<description><![CDATA[tawk.to live chat integration.]]></description>
77
<author><![CDATA[tawk.to]]></author>
88
<tab><![CDATA[front_office_features]]></tab>

prestashop1.6/tawkto.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct()
3333
{
3434
$this->name = 'tawkto';
3535
$this->tab = 'front_office_features';
36-
$this->version = '1.2.1';
36+
$this->version = '1.2.2';
3737
$this->author = 'tawk.to';
3838
$this->need_instance = 0;
3939
$this->ps_versions_compliancy = array('min' => '1.5', 'max' => '1.6');
@@ -88,7 +88,7 @@ public function hookDisplayFooter()
8888
if ($result) {
8989
$options = json_decode($result);
9090

91-
if (!is_null($options->enable_visitor_recognition)) {
91+
if (isset($options->enable_visitor_recognition)) {
9292
$enable_visitor_recognition = $options->enable_visitor_recognition;
9393
}
9494

prestashop1.7/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<module>
33
<name>tawkto</name>
44
<displayName><![CDATA[tawk.to]]></displayName>
5-
<version><![CDATA[1.2.1]]></version>
5+
<version><![CDATA[1.2.2]]></version>
66
<description><![CDATA[tawk.to live chat integration.]]></description>
77
<author><![CDATA[tawk.to]]></author>
88
<tab><![CDATA[front_office_features]]></tab>

prestashop1.7/tawkto.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct()
3333
{
3434
$this->name = 'tawkto';
3535
$this->tab = 'front_office_features';
36-
$this->version = '1.2.1';
36+
$this->version = '1.2.2';
3737
$this->author = 'tawk.to';
3838
$this->need_instance = 0;
3939
$this->ps_versions_compliancy = array('min' => '1.5', 'max' => '1.7');
@@ -88,7 +88,7 @@ public function hookDisplayFooter()
8888
$options = json_decode($result);
8989
$current_page = (string) $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
9090

91-
if (!is_null($options->enable_visitor_recognition)) {
91+
if (isset($options->enable_visitor_recognition)) {
9292
$enable_visitor_recognition = $options->enable_visitor_recognition;
9393
}
9494

0 commit comments

Comments
 (0)