Skip to content

Commit d90a178

Browse files
author
Jen Lampton
committed
Issue #42: Fix PHP warnng: Illegal string offset 'version' in backdrop_get_library().
1 parent ddeb502 commit d90a178

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

colorbox.module

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,36 +89,37 @@ function colorbox_views_api() {
8989
* Implements hook_library_info().
9090
*/
9191
function colorbox_library_info() {
92+
$colorbox_path = backdrop_get_path('module', 'colorbox');
9293
$libraries['colorbox'] = array(
9394
'title' => 'Colorbox',
9495
'website' => 'http://www.jacklmoore.com/colorbox',
9596
'version' => '1.6.4',
9697
'js' => array(
97-
backdrop_get_path('module', 'colorbox') . '/libraries/colorbox/jquery.colorbox-min.js' => array(),
98+
$colorbox_path . '/libraries/colorbox/jquery.colorbox-min.js' => array(),
9899
),
99100
);
100101
$libraries['colorbox-source'] = array(
101102
'title' => 'Colorbox',
102103
'website' => 'http://www.jacklmoore.com/colorbox',
103104
'version' => '1.6.4',
104105
'js' => array(
105-
backdrop_get_path('module', 'colorbox') . '/libraries/colorbox/jquery.colorbox.js' => array(),
106+
$colorbox_path . '/libraries/colorbox/jquery.colorbox.js' => array(),
106107
),
107108
);
108109
$libraries['DOMPurify'] = array(
109110
'title' => 'DOMPurify',
110111
'website' => 'https://github.com/cure53/DOMPurify',
111112
'version' => '2.3.6',
112113
'js' => array(
113-
backdrop_get_path('module', 'colorbox') . '/libraries/DOMPurify/purify.min.js',
114+
$colorbox_path . '/libraries/DOMPurify/purify.min.js' => array(),
114115
),
115116
);
116117
$libraries['DOMPurify-source'] = array(
117118
'title' => 'DOMPurify',
118119
'website' => 'https://github.com/cure53/DOMPurify',
119120
'version' => '2.3.6',
120121
'js' => array(
121-
backdrop_get_path('module', 'colorbox') . '/libraries/DOMPurify/purify.js',
122+
$colorbox_path . '/libraries/DOMPurify/purify.js' => array(),
122123
),
123124
);
124125

0 commit comments

Comments
 (0)