[GH-ISSUE #217] Smarty modifiers want undefined DS constant #170

Closed
opened 2026-02-26 09:36:28 +03:00 by kerem · 1 comment
Owner

Originally created by @dereckson on GitHub (Dec 28, 2016).
Original GitHub issue: https://github.com/opensolutions/ViMbAdmin/issues/217

Notice: Use of undefined constant DS - assumed 'DS' in /usr/local/vimbadmin/library/ViMbAdmin/Smarty/functions/modifier.date_formatter.php on line 47

if (DS == '\\') {

When Smarty is correctly initialized, DS is the directory separator

As the application targets UNIX systems, define('DS', DIRECTORY_SEPARATOR); seems safe to fix the issue.

Originally created by @dereckson on GitHub (Dec 28, 2016). Original GitHub issue: https://github.com/opensolutions/ViMbAdmin/issues/217 Notice: Use of undefined constant DS - assumed 'DS' in /usr/local/vimbadmin/library/ViMbAdmin/Smarty/functions/modifier.date_formatter.php on line 47 `if (DS == '\\') {` When Smarty is correctly initialized, DS is the directory separator As the application targets UNIX systems, `define('DS', DIRECTORY_SEPARATOR);` seems safe to fix the issue.
kerem closed this issue 2026-02-26 09:36:28 +03:00
Author
Owner

@dereckson commented on GitHub (May 18, 2020):

Root cause: DS constant has been removed in Smarty 3.1.31.

https://fossies.org/diffs/smarty/3.1.30_vs_3.1.31/libs/Smarty.class.php-diff.html

<!-- gh-comment-id:629981645 --> @dereckson commented on GitHub (May 18, 2020): Root cause: DS constant has been removed in Smarty 3.1.31. https://fossies.org/diffs/smarty/3.1.30_vs_3.1.31/libs/Smarty.class.php-diff.html
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ViMbAdmin-opensolutions#170
No description provided.