mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
Fix undefined UrlOembed provider pattern (#5662)
* Fix undefined UrlOembed provider pattern * Update CHANGELOG.md (#5652) Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
This commit is contained in:
parent
2eccd0422d
commit
709b35fed7
@ -1,9 +1,9 @@
|
||||
HumHub Changelog
|
||||
================
|
||||
|
||||
|
||||
1.11.2 (Unreleased)
|
||||
-------------------
|
||||
-----------------------
|
||||
- Fix: #5652: Fix undefined UrlOembed provider pattern
|
||||
- Fix #5660: Individual modules marked with "Official" label in Marketplace
|
||||
- Fix #5657: Fix links of user counters in container headers
|
||||
|
||||
|
@ -118,7 +118,7 @@ class UrlOembed extends ActiveRecord
|
||||
public function getProviderUrl()
|
||||
{
|
||||
foreach (static::getProviders() as $provider) {
|
||||
if (preg_match($provider['pattern'], $this->url)) {
|
||||
if (isset($provider['pattern']) && preg_match($provider['pattern'], $this->url)) {
|
||||
return str_replace("%url%", urlencode($this->url), $provider['endpoint']);
|
||||
}
|
||||
}
|
||||
@ -362,7 +362,7 @@ class UrlOembed extends ActiveRecord
|
||||
public static function getProviderByUrl($url)
|
||||
{
|
||||
foreach (static::getProviders() as $provider) {
|
||||
if (preg_match($provider['pattern'], $url)) {
|
||||
if (isset($provider['pattern']) && preg_match($provider['pattern'], $url)) {
|
||||
return $provider['endpoint'];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user