Skip to content

Deprecation warning in demo app, Smarty 5.8.4, PHP 8.4 #1208

Description

@Katerine459

Testing with the demo page (/demo/index.php) that's included in the download. I made a slight change to it to manually include Smarty:

require_once(str_replace("\\","/",dirname(__FILE__)).'/../../basic-includes.php');

$smarty = new \Smarty\Smarty();

Here's the content of basic-includes.php:

define('SMARTY_DIR',str_replace("\\","/",dirname(__FILE__)).'/Smarty-5.8.4/libs/');

require_once(SMARTY_DIR . 'Smarty.class.php');

Here's the section of the resulting page (viewing the HTML) that contains errors:

<html>
<body>
<!--StartFragment-->
1 * John Doe
--
<br />
<b>Deprecated</b>:  Implicit conversion from float 0.5 to int loses precision in <b>[webrootdir]\includes\Smarty-5.8.4\demo\templates_c\38607186f9af3abe30d7327c890dad1b0743261a_0.file_index.tpl.cache.php</b> on line <b>68</b><br />
2 * Mary Smith
3 . James Johnson
<br />
<b>Deprecated</b>:  Implicit conversion from float 1.5 to int loses precision in <b>[webrootdir]\includes\Smarty-5.8.4\demo\templates_c\38607186f9af3abe30d7327c890dad1b0743261a_0.file_index.tpl.cache.php</b> on line <b>68</b><br />
4 . Henry Case
 

<br class="Apple-interchange-newline"><!--EndFragment-->
</body>
</html>

Note: not sure if this is due to the presence of the error, or if it's due to the conversion error itself, but in the resulting HTML, numbers 1 and 3 are more indented than numbers 2 and 4.

ETA: it's on a Windows 11 machine, IIS and FastCGI. Smarty 5.8.4, PHP 8.4

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions