Comments (1)
reviewscouk/reviews/Block/Product/Reviewwidget.php line 112 if colour is NULL in the admin this line fails. replacing the line with sorts this.
if (strpos($colour ?? '', '#') === false) {
Looks like the problem has been addressed in the latest release. However, there is another place in the same file that needs to be updated too. Here's the patch we used.
Index: vendor/reviewscouk/reviews/Block/Product/Reviewwidget.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/vendor/reviewscouk/reviews/Block/Product/Reviewwidget.php b/vendor/reviewscouk/reviews/Block/Product/Reviewwidget.php
--- a/vendor/reviewscouk/reviews/Block/Product/Reviewwidget.php
+++ b/vendor/reviewscouk/reviews/Block/Product/Reviewwidget.php
@@ -130,7 +130,7 @@ class Reviewwidget extends Framework\View\Element\Template
$colour = '#' . $colour;
}
// checking to see if we hare a valid colour. If not then we change it to reviews default hex colour
- if (!preg_match('/^#[a-f0-9]{6}$/i', $colour)) {
+ if ($colour && !preg_match('/^#[a-f0-9]{6}$/i', $colour)) {
$colour = '#5db11f';
}
return $colour;
from magento2-reviews.
Related Issues (15)
- Non Composer Installation HOT 1
- Pull through average review rating for simple and configurable products HOT 1
- Verified Buyer text missing in Static Content Widget HOT 1
- Content Security Policy Error HOT 1
- Feature request: Add GTIN to product catalogue feed HOT 3
- Missing ACL - no ability to give user roles access to configuration
- Issue with Simple Products with Custom Options HOT 1
- Change rich snippet info for review's Author. HOT 1
- Exception #0 (Exception): Notice: Trying to access array offset on value of type null in /vendor/reviewscouk/reviews/Block/Richsnippet.php on line 51 HOT 2
- Widgets are HTML escaped HOT 1
- Feature request: option of cancelling a scheduled review request email when an order is refunded
- PHP Compat Issue When Using v2.4.4-p2 HOT 1
- richSnippet SKU with double-quote
- feat: move api calls to async
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magento2-reviews.