Re: com web/master: This is just reaaallly annoying when setting up master: include/functions.inc
| From: | James Titcumb | Date: | Wed, 11 Dec 2013 06:03:47 +0000 |
| Subject: | Re: com web/master: This is just reaaallly annoying when setting up master: include/functions.inc | ||
| References: | 1 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-17516@lists.php.net to get a copy of this message | ||
Woah, php.net uses deprecated "mysql" extension?? Surely not! :-)
James
On 11 Dec 2013 03:28, "Hannes Magnusson" <bjori@php.net> wrote:
> Commit: 524d0a518c4594fcbbdde79d4e9fb17e84def355
> Author: Hannes Magnusson <bjori@mongodb.com> Tue, 10 Dec 2013
> 19:28:46 -0800
> Parents: 514f32e87210668d051a75c63b0304665af54d4d
> Branches: master
>
> Link:
>
> http://git.php.net/?p=web/master.git;a=commitdiff;h=524d0a518c4594fcbbdde79d4e9fb17e84def355
>
> Log:
> This is just reaaallly annoying when setting up master
>
> Changed paths:
> M include/functions.inc
>
>
> Diff:
> diff --git a/include/functions.inc b/include/functions.inc
> index 8f97087..62b3f83 100644
> --- a/include/functions.inc
> +++ b/include/functions.inc
> @@ -93,13 +93,13 @@ function real_clean($var) { return
> mysql_real_escape_string($var); }
>
> function db_connect($dieonerror = TRUE)
> {
> - if (!@mysql_connect("localhost", "nobody", "")) {
> + if (!mysql_connect("localhost", "nobody", "")) {
> if ($dieonerror) {
> die(format_warn("Unable to connect to database!"));
> }
> return FALSE;
> }
> - elseif (!@mysql_select_db("phpmasterdb")) {
> + elseif (!mysql_select_db("phpmasterdb")) {
> if ($dieonerror) {
> die(format_warn("Unable to select database!"));
> }
> @@ -111,7 +111,7 @@ function db_connect($dieonerror = TRUE)
> function db_query($query)
> {
> //var_dump($query);
> - $res = @mysql_query($query);
> + $res = mysql_query($query);
> if (!$res) {
> $bt = debug_backtrace();
> die(format_warn("Query failed: " . hsc(mysql_error()) .
> "<tt>\n"
> . hsc($query) . "</tt><br
> />({$bt[0]['file']}:{$bt[0]['line']})"));
> @@ -122,7 +122,7 @@ function db_query($query)
>
> function db_get_one($query)
> {
> - $res = @mysql_query($query);
> + $res = mysql_query($query);
> if ($res && mysql_num_rows($res)) {
> return mysql_result($res, 0);
> }
>
>
> --
> PHP Webmaster List Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>