Ok, I really need help. I am running EE (an older version admittedly) but this just started happening. I noticed a lot of spam accounts being requesting authorization to my website. I went in to the account management section of my website and I am presented with this: - Catchable fatal error: Object of class stdClass could not be converted to string in /home/ninjamon/public_html/guitars/pm/cp/members.cp.php on line 62
- Here is my members.cp.php file with line 62 marked.
-
<?php
-
//
-
// pMachine Publishing Software
-
//
-
// Version 2.3
-
//
-
// Copyright (c) 2003 Rick Ellis All rights reserved.
-
//
-
// THIS IS COPYRIGHTED SOFTWARE
-
//
-
// License holders may alter or modify this software for their own use,
-
// but may NOT resell or redistribute the modified or derivative version
-
// without prior written consent from pMachine. Components from this
-
// software may not be extracted and used in other programs without prior
-
// written consent from pMachine.
-
//
-
// PLEASE READ THE LICENSE AGREEMENT
-
//
-
-
// ----------------------------------------------
-
// GET MEMBER PROFILE
-
// ----------------------------------------------
-
-
function get_member_profile($id, $show)
-
{
-
global $use_session_id, $db_members, $L_CALENDAR, $db_mailinglist;
-
global $db_session, $member_code, $sx;
-
-
$db = new DB();
-
-
$qval = "id";
-
-
if ($show == "new")
-
$qval = "member_id";
-
-
if ($id == "self")
-
{
-
if ($use_session_id == 1)
-
{
-
$sql = "select member_id from $db_session where session_id = '$sx'";
-
$query = new DB_query($db, $sql);
-
$query->db_fetch_object();
-
$member_code = $query->obj->member_id;
-
-
unset($sql);
-
unset($query);
-
}
-
-
$id = $member_code;
-
$qval = "member_id";
-
}
-
-
$sql = "select * from $db_members where $qval = '$id'";
-
$query = new DB_query($db, $sql);
-
$query->db_fetch_object();
-
-
$query->obj->lastpost <> 0 ? $lastpost = date("m/d/Y m:i a",$query->obj->lastpost) : $lastpost = "-";
-
-
$joindate = date("m/d/Y m:i a",$query->obj->joindate);
-
-
- $q = "select count(*) as count from $db_mailinglist where email='$query->obj->email'"; <-- LINE 62
-
$res = new DB_query($db, $q);
-
$res->db_fetch_object();
-
-
$res->obj->count > 0 ? $mailinglist ="yes" : $mailinglist ="";
-
-
unset($q);
-
unset($res)
Any help would be greatly appreciated. I am not a coder or php guru. I am mostly the opposite of that.
TIA,
Ed
9 36961
try var_dump() on $query and $query->obj, maybe it gives some hints.
Ok, I don't really know to do that. I running everything from the GUI.
e.g. paste following code into line 61: - var_dump( $query );
-
var_dump( $query->obj );
this will give you some text output (namely the object's properties).
Wow. Thank you. That got me this: - object(DB_query)#3 (9) { ["query"]=> resource(61) of type (mysql result) ["sql"]=> string(40) "select * from pm_members where id = '80'" ["row"]=> array(0) { } ["obj"]=> object(stdClass)#2 (27) { ["id"]=> string(2) "80" ["member_id"]=> string(23) "20888449254861dcdad253d" ["username"]=> string(9) "abu***" ["password"]=> string(32) "[removed]" ["signature"]=> string(9) "abu***" ["email"]=> string(17) "***@krim.ws" ["location"]=> string(0) "" ["url"]=> string(0) "" ["occupation"]=> string(0) "" ["interests"]=> string(0) "" ["bio"]=> string(0) "" ["bday_day"]=> string(0) "" ["bday_month"]=> string(0) "" ["bday_year"]=> string(0) "" ["icq"]=> string(0) "" ["aol_im"]=> string(0) "" ["yahoo_im"]=> string(0) "" ["msn_im"]=> string(0) "" ["show_email"]=> string(2) "no" ["get_email"]=> string(2) "no" ["joindate"]=> string(10) "1214373082" ["numentries"]=> string(1) "0" ["numcomments"]=> string(1) "0" ["lastpost"]=> string(1) "0" ["status"]=> string(1) "2" ["ipaddress"]=> string(14) "77.127.106.213" ["deft_weblog"]=> string(0) "" } ["res"]=> NULL ["numrows"]=> NULL ["rows"]=> int(0) ["errors"]=> int(0) ["result"]=> bool(true) } object(stdClass)#2 (27) { ["id"]=> string(2) "80" ["member_id"]=> string(23) "20888449254861dcdad253d" ["username"]=> string(9) "abubmiday" ["password"]=> string(32) "350d20ac2e95dc31d573a3f34a1e3d22" ["signature"]=> string(9) "abubmiday" ["email"]=> string(17) "stotlytof@krim.ws" ["location"]=> string(0) "" ["url"]=> string(0) "" ["occupation"]=> string(0) "" ["interests"]=> string(0) "" ["bio"]=> string(0) "" ["bday_day"]=> string(0) "" ["bday_month"]=> string(0) "" ["bday_year"]=> string(0) "" ["icq"]=> string(0) "" ["aol_im"]=> string(0) "" ["yahoo_im"]=> string(0) "" ["msn_im"]=> string(0) "" ["show_email"]=> string(2) "no" ["get_email"]=> string(2) "no" ["joindate"]=> string(10) "1214373082" ["numentries"]=> string(1) "0" ["numcomments"]=> string(1) "0" ["lastpost"]=> string(1) "0" ["status"]=> string(1) "2" ["ipaddress"]=> string(14) "77.127.106.213" ["deft_weblog"]=> string(0) "" }
-
Catchable fatal error:
Object of class stdClass could not be converted to string in /home/ninjamon/public_html/guitars/pm/cp/members.cp.php on line 63
Can you help me decipher it? I am not a db person at all.
TIA
where can I find the definition of the DB class? (the class used on line 30)
basicly I need to figure out whether $query->obj->email is a public, protected or private property, maybe I can find out something by looking at the db_fetch_obj() method.
I am not sure. Sorry. But I am willing to send you any file you think would help. I know I am not much of a help here. LOL. Sorry.
I'll first try my luck with the definition of DB. you can recognise it by the following line - class DB
-
// or
-
class DB extends {parent-class-name}
-
// or
-
class DB implements {one ore more interface names}
Thanks Dormilich!
You made me sign-up for this forum. :)
unfortunately such interesting topics like OOP are rather rare (;_;)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Amy L. |
last post by:
I have a class that contains a string array. However, I can't get
this object to serialize in the xml output. Is there a trick to get a
string to...
|
by: Earl Teigrob |
last post by:
In the exampe below, the constructor of the container class is passed the
string called "foo". Within the container class, I would like to create an...
|
by: Ram |
last post by:
Hi Friends
I want to develope a custom control in .net which can be used with any
project. I am writing a function in that class which I want to...
|
by: John Smith |
last post by:
How can I allow someone to cast my C# class into System.String? Is it
possible in C#? In C++ I used "operator" keyword to mark C++ member
function.
|
by: mikie |
last post by:
somebody asked me a question:
string is derived from object class, right? (i said yes)
so how it could be object class declares method returning...
|
by: TazaTek |
last post by:
Hello,
I've seen some vague references on how to do this a factory, but not
in enough detail to create one, or even know if it's what I need.
...
|
by: Bigi |
last post by:
Hi,
Please help, this has been driving me nuts for nearly 2 days now.
This vb6 code works:
Public oEng As New ebizEngine
Public oMsg As...
|
by: Jean Marie |
last post by:
Hi,
i have a problem with the usage of stdClass.
From a SOAP based web service i get a code list as an array of
stdClass instances:
array (...
|
by: maheswaran |
last post by:
Hi guys,
I have below values in array
stdClass Object ( => stdClass Object ( => 50s / 60s ERA => 87 => - => 25 => CONCERTS => 2 ) =>...
|
by: tammygombez |
last post by:
Hey fellow JavaFX developers,
I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
|
by: tammygombez |
last post by:
Hey everyone!
I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
|
by: concettolabs |
last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
|
by: jalbright99669 |
last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: Matthew3360 |
last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
| |