<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									MergedEvent crashes on PHP 8 when agent name contains URL-encoded characters - Bugs and display issues				            </title>
            <link>https://osawesome.com/community/bugs/mergedevent-crashes-on-php-8-when-agent-name-contains-url-encoded-characters/</link>
            <description>osTicket Awesome Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Fri, 07 Aug 2026 22:34:48 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: MergedEvent crashes on PHP 8 when agent name contains URL-encoded characters</title>
                        <link>https://osawesome.com/community/bugs/mergedevent-crashes-on-php-8-when-agent-name-contains-url-encoded-characters/#post-3488</link>
                        <pubDate>Tue, 30 Jun 2026 17:21:48 +0000</pubDate>
                        <description><![CDATA[Hi Carsten,It&#039;s been a week and you haven&#039;t replied yet. I&#039;m sure you&#039;re busy. I didn&#039;t want your effort to go to waste and I didn&#039;t want to pester you so I went ahead and posted that Issue ...]]></description>
                        <content:encoded><![CDATA[<p>Hi Carsten,<br /><br />It's been a week and you haven't replied yet. I'm sure you're busy. I didn't want your effort to go to waste and I didn't want to pester you so I went ahead and posted that Issue on GitHub:<br /><br />https://github.com/osTicket/osTicket/issues/6962<br /><br />Hopefully an upstream fix will be released for this soon. I will mark this 'Resolved' for now, but if I notice that Enhancesoft post a fix for this I will try to post an update here. Cheers.</p>]]></content:encoded>
						                            <category domain="https://osawesome.com/community/bugs/">Bugs and display issues</category>                        <dc:creator>stevland</dc:creator>
                        <guid isPermaLink="true">https://osawesome.com/community/bugs/mergedevent-crashes-on-php-8-when-agent-name-contains-url-encoded-characters/#post-3488</guid>
                    </item>
				                    <item>
                        <title>RE: MergedEvent crashes on PHP 8 when agent name contains URL-encoded characters</title>
                        <link>https://osawesome.com/community/bugs/mergedevent-crashes-on-php-8-when-agent-name-contains-url-encoded-characters/#post-3486</link>
                        <pubDate>Tue, 23 Jun 2026 18:34:32 +0000</pubDate>
                        <description><![CDATA[Thanks for the detailed write-up, Carsten. You&#039;ve done the investigative work here and your analysis is correct. The {somebody} placeholder is expanded by template() before sprintf() runs, s...]]></description>
                        <content:encoded><![CDATA[<p class="font-claude-response-body break-words whitespace-normal">Thanks for the detailed write-up, Carsten. You've done the investigative work here and your analysis is correct. The <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded- px-1 py-px text-">{somebody}</code> placeholder is expanded by <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded- px-1 py-px text-">template()</code> before <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded- px-1 py-px text-">sprintf()</code> runs, so any URL-encoded characters in the resulting HTML (like <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded- px-1 py-px text-">%C3%B8</code> from "Sørensen") land in <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded- px-1 py-px text-">sprintf()</code> as format specifiers. PHP 7 would silently ignore unknown ones; PHP 8 throws a <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded- px-1 py-px text-">ValueError</code>. Your suggested fix is sound.</p>
<p class="font-claude-response-body break-words whitespace-normal">This is a bug in osTicket core (<code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded- px-1 py-px text-">include/class.thread.php</code>) rather than something osTicket Awesome modifies, so as a matter of policy its not something I can patch on our end (I don't patch upstream issues in osTicket Awesome as doing so would create too much chaos over time). <br /><br />What I can do is take your report and open an issue on the osTicket GitHub tracker on your behalf. You've already written the hard part. I'd send you the link so you can follow it upstream.</p>
<p class="font-claude-response-body break-words whitespace-normal">Would you like me to do that? Or perhaps you would rather do it yourself and receive all of the glory. Let me know which you prefer.</p>]]></content:encoded>
						                            <category domain="https://osawesome.com/community/bugs/">Bugs and display issues</category>                        <dc:creator>stevland</dc:creator>
                        <guid isPermaLink="true">https://osawesome.com/community/bugs/mergedevent-crashes-on-php-8-when-agent-name-contains-url-encoded-characters/#post-3486</guid>
                    </item>
				                    <item>
                        <title>MergedEvent crashes on PHP 8 when agent name contains URL-encoded characters</title>
                        <link>https://osawesome.com/community/bugs/mergedevent-crashes-on-php-8-when-agent-name-contains-url-encoded-characters/#post-3485</link>
                        <pubDate>Tue, 23 Jun 2026 08:17:37 +0000</pubDate>
                        <description><![CDATA[Environment:

osTicket-1.18.3-Awesome-104
PHP 8.3.6

When viewing a ticket containing merged child tickets, osTicket throws a fatal PHP error:PHP Fatal error: Uncaught ValueError: Unkno...]]></description>
                        <content:encoded><![CDATA[<p>Environment:</p>
<ul>
<li><span>osTicket-1.18.3-Awesome-104</span></li>
<li>PHP 8.3.6</li>
</ul>
When viewing a ticket containing merged child tickets, osTicket throws a fatal PHP error:<br /><br />PHP Fatal error: Uncaught ValueError: Unknown format specifier "C"<br /><br />The error originates from:<br /><br /><br />
<pre contenteditable="false">include/class.thread.php

class MergedEvent extends ThreadEvent {
function getDescription($mode=self::MODE_STAFF) {
return sprintf(
$this-&gt;template(
__('{somebody} merged this ticket with %s{data.id}%s{data.ticket}%s {timestamp}'),
$mode
),
'', ''
);
}
}</pre>
<p><br />Stack trace points directly to the sprintf() call.<br /><br />Root Cause:<br />The {somebody} placeholder is expanded before sprintf() is executed.<br /><br />In our installation the merged event was created by an agent named:<br /><br />Casper F. Sørensen<br /><br />The generated HTML contains an avatar URL with URL-encoded characters:<br /><br />name=Casper+F.+S%C3%B8rensen<br /><br />After placeholder substitution, sprintf() receives a string containing:<br /><br />%C3%B8<br /><br />PHP 8 interprets "%C" as a format specifier and throws:<br /><br />ValueError: Unknown format specifier "C"<br /><br />This causes the entire ticket thread rendering to fail.<br /><br />Example Debug Output:<br />Template result:<br /><br />&lt;img class="avatar" ... name=Casper+F.+S%C3%B8rensen" /&gt;Casper F. Sørensen<br />merged this ticket with 344<br />Ticket #S416<br /><br />Expected Behavior:<br />Merged ticket events should render correctly regardless of agent names containing non-ASCII characters such as:<br /><br />ø<br />æ<br />å<br />ü<br />é<br />etc.<br /><br />Actual Behavior:<br />Ticket thread rendering fails with a fatal PHP error.<br /><br />Suggested Fix:<br />Avoid using sprintf() after placeholder expansion.<br /><br />One possible approach:<br /><br />Build the link placeholders before template rendering.<br />Use str_replace() instead of sprintf().<br />Escape literal percent signs before passing strings to sprintf().<br /><br />For example:<br /><br /></p>
<pre contenteditable="false">return str_replace(
array('LINK_START', 'LINK_MID', 'LINK_END'),
array('', ''),
$this-&gt;template(__($raw), $mode)
);</pre>
<p><br />Impact:<br />Any merged ticket can become unreadable when the merge event was performed by an agent whose display name results in URL-encoded percent sequences being present in the rendered HTML.<br /><br />This appears to be a PHP 8 compatibility issue rather than a localization or theme issue.</p>]]></content:encoded>
						                            <category domain="https://osawesome.com/community/bugs/">Bugs and display issues</category>                        <dc:creator>Carsten Bækmand</dc:creator>
                        <guid isPermaLink="true">https://osawesome.com/community/bugs/mergedevent-crashes-on-php-8-when-agent-name-contains-url-encoded-characters/#post-3485</guid>
                    </item>
							        </channel>
        </rss>
		