gerkintrigg Posted September 4, 2007 Share Posted September 4, 2007 I'm trying to work out why I'm getting this error: Fatal error: Call to a member function on a non-object in /my_path/sexandbreakfast.com/rescale_img/resize.php on line 31 Line 31 states:$objResize->getResizedImage(); There are includes to functions, but all the paths look correct. I used this script on another site and it works beautifully. Any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/67884-function-error/ Share on other sites More sharing options...
hostfreak Posted September 4, 2007 Share Posted September 4, 2007 Did you create a new instance of the object? $objResize = new CLASSNAME; //change to your class name $objResize->getResizedImage(); Quote Link to comment https://forums.phpfreaks.com/topic/67884-function-error/#findComment-341228 Share on other sites More sharing options...
recklessgeneral Posted September 4, 2007 Share Posted September 4, 2007 Another common problem that I've been bitten by on a number of occasions is a typo in one of your uses of the variables. Make sure they are spelled consistently throughout your code as PHP will just assume you're using another variable, which won't have been initialized. Quote Link to comment https://forums.phpfreaks.com/topic/67884-function-error/#findComment-341241 Share on other sites More sharing options...
gerkintrigg Posted September 5, 2007 Author Share Posted September 5, 2007 is there a chance that I've not uploaded the watermark image that it merges with? Quote Link to comment https://forums.phpfreaks.com/topic/67884-function-error/#findComment-341921 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.