Skip to content

Instantly share code, notes, and snippets.

View pilif's full-sized avatar

Philip Hofstetter pilif

View GitHub Profile
diff --git a/src/Analyser/Ignore/IgnoredErrorHelper.php b/src/Analyser/Ignore/IgnoredErrorHelper.php
index 068114767..bff07c108 100644
--- a/src/Analyser/Ignore/IgnoredErrorHelper.php
+++ b/src/Analyser/Ignore/IgnoredErrorHelper.php
@@ -68,9 +68,9 @@ class IgnoredErrorHelper
continue;
}
- $key = '';
+ $key = $ignoreError['path'];
diff --git a/src/Analyser/Ignore/IgnoredErrorHelper.php b/src/Analyser/Ignore/IgnoredErrorHelper.php
index 068114767..bff07c108 100644
--- a/src/Analyser/Ignore/IgnoredErrorHelper.php
+++ b/src/Analyser/Ignore/IgnoredErrorHelper.php
@@ -68,9 +68,9 @@ class IgnoredErrorHelper
continue;
}
- $key = '';
+ $key = $ignoreError['path'];
diff --git a/src/Psalm/Issue/PropertyIssue.php b/src/Psalm/Issue/PropertyIssue.php
index f64cd6cc4..4d0befda1 100644
--- a/src/Psalm/Issue/PropertyIssue.php
+++ b/src/Psalm/Issue/PropertyIssue.php
@@ -4,6 +4,8 @@ namespace Psalm\Issue;
use Psalm\CodeLocation;
+use function get_class;
+
diff --git a/lib/modbase.php b/lib/modbase.php
index 64617bf5fe..806ab0bc15 100644
--- a/lib/modbase.php
+++ b/lib/modbase.php
@@ -690,9 +690,9 @@ abstract class PopScanModBase implements PopScanModule
) {
$md = true;
}
- if (!Customization::callHook("AlwaysDisplayVendorMessages")) {
+ #if (!Customization::callHook("AlwaysDisplayVendorMessages")) {
diff --git a/lib/catalog/tag_node.php b/lib/catalog/tag_node.php
index 2054e5faf1..6fc9cc182e 100644
--- a/lib/catalog/tag_node.php
+++ b/lib/catalog/tag_node.php
@@ -320,7 +320,7 @@ class TagNode extends RootParentedVirtualNode
/** @psalm-suppress PossiblyUnusedParam */
public function getProductFinderConstraints(bool $cascade): ?array
{
- return [$this->tag['tag_name'] => true, 'vendor' => $this->getVendor()->getId()];
+ return array_merge($this->getVendor()->getTagNodeConstraints(), ['vendor' => $this->getVendor()->getId()]);
@pilif
pilif / times.sql
Last active December 5, 2018 06:51
create table times (
id bigserial not null primary key,
ts timestamp without time zone not null,
z text not null
);
insert into times (ts, z) values ('2018-12-05 8:00', 'Europe/Zurich');
insert into times (ts, z) values ('2018-12-05 7:00', 'UTC');
insert into times (ts, z) values ('2018-12-05 7:00', 'Europe/Zurich');
create table times (
id bigserial not null primary key,
ts timestamp without time zone not null,
zone text not null
);
insert into times (ts, zone) values ('2018-12-05 8:00', 'Europe/Zurich');
insert into times (ts, zone) values ('2018-12-05 7:00', 'UTC');
insert into times (ts, zone) values ('2018-12-05 7:00', 'Europe/Zurich');
HTTP/2 200
server: nginx/1.10.3
date: Mon, 30 Jul 2018 13:01:16 GMT
content-type: text/html
content-length: 2303
last-modified: Mon, 08 Apr 2013 08:07:14 GMT
etag: "51627ab2-8ff"
strict-transport-security: max-age=15552001
accept-ranges: bytes
HTTP/2 200
server: nginx/1.10.3
date: Mon, 30 Jul 2018 13:00:51 GMT
content-type: text/html
content-length: 2303
last-modified: Mon, 08 Apr 2013 08:07:14 GMT
etag: "51627ab2-8ff"
strict-transport-security: max-age=15552001
accept-ranges: bytes
root@app99:/tmp# zgrep srv/storage trace-export-local.gz
lstat("/srv/storage/vendassets", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
lstat("/srv/storage", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/srv/storage/vendassets//bianchi/images/18016/18016_01.jpg", {st_mode=S_IFREG|0644, st_size=162314, ...}) = 0
stat("/srv/storage/vendassets//bianchi/images/30266/30266_01.jpg", {st_mode=S_IFREG|0644, st_size=341431, ...}) = 0
stat("/srv/storage/vendassets//bianchi/images/9000/9000_01.jpg", {st_mode=S_IFREG|0644, st_size=319921, ...}) = 0
stat("/srv/storage/vendassets//bianchi/images/35157/35157_01.jpg", {st_mode=S_IFREG|0644, st_size=913414, ...}) = 0
stat("/srv/storage/vendassets//bianchi/images/60105/60105_01.jpg", {st_mode=S_IFREG|0644, st_size=388988, ...}) = 0
stat("/srv/storage/vendassets//bianchi/images/9002/9002_01.jpg", {st_mode=S_IFREG|0644, st_size=293402, ...}) = 0
stat("/srv/storage/vendassets//bianchi/images/20428/20428_01.jpg", {st_mode=S_IFREG|0644, st_size=298260, ...}) = 0