Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
52d397ae
Unverified
Commit
52d397ae
authored
4 years ago
by
Eileen McNaughton
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #18830 from adixon/asset-building-error-2137
put asset rendering call into a try/catch - dev/core
#2137
parents
338ca6e9
f555d59e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Civi/Core/AssetBuilder.php
+9
-4
9 additions, 4 deletions
Civi/Core/AssetBuilder.php
with
9 additions
and
4 deletions
Civi/Core/AssetBuilder.php
+
9
−
4
View file @
52d397ae
...
...
@@ -188,10 +188,15 @@ class AssetBuilder {
if
(
!
file_exists
(
$this
->
getCachePath
()))
{
mkdir
(
$this
->
getCachePath
());
}
$rendered
=
$this
->
render
(
$name
,
$params
);
file_put_contents
(
$this
->
getCachePath
(
$fileName
),
$rendered
[
'content'
]);
return
$fileName
;
try
{
$rendered
=
$this
->
render
(
$name
,
$params
);
file_put_contents
(
$this
->
getCachePath
(
$fileName
),
$rendered
[
'content'
]);
return
$fileName
;
}
catch
(
UnknownAssetException
$e
)
{
// unexpected error, log and continue
Civi
::
log
()
->
error
(
'Unexpected error while rendering a file in the AssetBuilder'
);
}
}
return
$fileName
;
}
...
...
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