does java style type casting work in php?
Tom Sommer wrote:
>Update of /cvsroot/php-blog/serendipity
>In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21779
>
>Modified Files:
> exit.php
>Log Message:
>Better safe than sorry
>
>
>Index: exit.php
>===================================================================
>RCS file: /cvsroot/php-blog/serendipity/exit.php,v
>retrieving revision 1.7
>retrieving revision 1.8
>diff -u -d -r1.7 -r1.8
>--- exit.php 13 Sep 2004 16:14:02 -0000 1.7
>+++ exit.php 13 Sep 2004 16:20:44 -0000 1.8
>@@ -7,12 +7,12 @@
> if (isset($_GET['url_id']) && !empty($_GET['url_id']) && isset($_GET['entry_id']) && !empty($_GET['entry_id']) && is_numeric($_GET['url_id]) && is_numeric($_GET['entry_id'])) {
>
> // See if the submitted link is in our database and should be tracked
>- $links = serendipity_db_query("SELECT link FROM {$serendipity['dbPrefix']}references WHERE id = {$_GET['url_id']} AND entry_id = {$_GET['entry_id']}", true);
>+ $links = serendipity_db_query("SELECT link FROM {$serendipity['dbPrefix']}references WHERE id = '". (int)$_GET['url_id'] ."' AND entry_id = '". (int)$_GET['entry_id'] ."'", true);
>
> if (is_array($links) && isset($links['link'])) {
> // URL is valid. Track it.
> $url = $links['link'];
>- serendipity_track_url('exits', $url, $_GET['entry_id']);
>+ serendipity_track_url('exits', $url, (int)$_GET['entry_id']);
> } elseif (isset($_GET['url']) && !empty($_GET['url'])) {
> // URL is invalid. But a URL-location was sent, so we want to redirect the user kindly.
> $url = str_replace('&', '&', base64_decode($_GET['url']));
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
>Project Admins to receive an Apple iPod Mini FREE for your judgement on
>who ports your project to Linux PPC the best. Sponsored by IBM.
>Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
>_______________________________________________
>php-blog-cvs mailing list
>php...@li...
>https://lists.sourceforge.net/lists/listinfo/php-blog-cvs
>
>
|