Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_news
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_news
Commits
a4a919ba
Commit
a4a919ba
authored
5 years ago
by
Torsten Oppermann
Browse files
Options
Downloads
Patches
Plain Diff
[TASK] Fix possible nullpointer exception, fixing flexform query
parent
8d8b0c2c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Classes/Controller/ListByCategoryController.php
+7
-3
7 additions, 3 deletions
Classes/Controller/ListByCategoryController.php
Configuration/FlexForms/ListByCategory.xml
+1
-1
1 addition, 1 deletion
Configuration/FlexForms/ListByCategory.xml
with
8 additions
and
4 deletions
Classes/Controller/ListByCategoryController.php
+
7
−
3
View file @
a4a919ba
...
...
@@ -59,9 +59,9 @@ class ListByCategoryController extends AbstractController {
*
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentNameException
*/
public
function
initializeIndexAction
(){
public
function
initializeIndexAction
()
{
$currentPageBrowserPage
=
(
int
)
GeneralUtility
::
_GP
(
'tx_sgnews_pagebrowser'
)[
'currentPage'
];
if
(
$currentPageBrowserPage
>
0
){
if
(
$currentPageBrowserPage
>
0
)
{
$this
->
request
->
setArgument
(
'currentPageBrowserPage'
,
$currentPageBrowserPage
);
}
}
...
...
@@ -94,8 +94,12 @@ class ListByCategoryController extends AbstractController {
$categories
=
[];
foreach
(
$categoryUids
as
$categoryUid
)
{
$category
=
$this
->
categoryRepository
->
findByUid
(
$categoryUid
);
if
(
!
$category
)
{
continue
;
}
$categories
[
$categoryUid
]
=
$category
;
if
(
$category
->
_getProperty
(
'_languageUid'
)
>
0
)
{
if
(
$category
->
_getProperty
(
'_languageUid'
)
>
0
)
{
$originalLangCategory
=
$this
->
categoryRepository
->
findOriginalLanguageById
(
$category
->
getUid
());
if
(
$originalLangCategory
)
{
$categoriesById
[
$originalLangCategory
->
getUid
()]
=
$originalLangCategory
;
...
...
This diff is collapsed.
Click to expand it.
Configuration/FlexForms/ListByCategory.xml
+
1
−
1
View file @
a4a919ba
...
...
@@ -31,7 +31,7 @@
<size>
5
</size>
<maxitems>
99
</maxitems>
<foreign_table>
pages
</foreign_table>
<foreign_table_where>
AND sys_language_uid IN (-1, 0) AND doktype = 117 ORDER BY title
</foreign_table_where>
<foreign_table_where>
AND
pages.
sys_language_uid IN (-1, 0) AND
pages.
doktype = 117 ORDER BY
pages.
title
</foreign_table_where>
</config>
</TCEforms>
</settings.categories>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment