Fix variable type in include/text
This commit is contained in:
parent
1467a02576
commit
04b742a97d
1 changed files with 3 additions and 3 deletions
|
@ -122,7 +122,7 @@ function qp($s) {
|
||||||
*/
|
*/
|
||||||
function redir_private_images($a, &$item)
|
function redir_private_images($a, &$item)
|
||||||
{
|
{
|
||||||
$matches = false;
|
$matches = [];
|
||||||
$cnt = preg_match_all('|\[img\](http[^\[]*?/photo/[a-fA-F0-9]+?(-[0-9]\.[\w]+?)?)\[\/img\]|', $item['body'], $matches, PREG_SET_ORDER);
|
$cnt = preg_match_all('|\[img\](http[^\[]*?/photo/[a-fA-F0-9]+?(-[0-9]\.[\w]+?)?)\[\/img\]|', $item['body'], $matches, PREG_SET_ORDER);
|
||||||
if ($cnt) {
|
if ($cnt) {
|
||||||
foreach ($matches as $mtch) {
|
foreach ($matches as $mtch) {
|
||||||
|
@ -187,7 +187,7 @@ function get_cats_and_terms($item)
|
||||||
$categories = [];
|
$categories = [];
|
||||||
$folders = [];
|
$folders = [];
|
||||||
|
|
||||||
$matches = false;
|
$matches = [];
|
||||||
$first = true;
|
$first = true;
|
||||||
$cnt = preg_match_all('/<(.*?)>/', $item['file'], $matches, PREG_SET_ORDER);
|
$cnt = preg_match_all('/<(.*?)>/', $item['file'], $matches, PREG_SET_ORDER);
|
||||||
if ($cnt) {
|
if ($cnt) {
|
||||||
|
@ -208,7 +208,7 @@ function get_cats_and_terms($item)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (local_user() == $item['uid']) {
|
if (local_user() == $item['uid']) {
|
||||||
$matches = false;
|
$matches = [];
|
||||||
$first = true;
|
$first = true;
|
||||||
$cnt = preg_match_all('/\[(.*?)\]/', $item['file'], $matches, PREG_SET_ORDER);
|
$cnt = preg_match_all('/\[(.*?)\]/', $item['file'], $matches, PREG_SET_ORDER);
|
||||||
if ($cnt) {
|
if ($cnt) {
|
||||||
|
|
Loading…
Reference in a new issue