Warning: Missing argument 1 for __construct() in

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hostservi
Forum Newbie
Posts: 1
Joined: Sat Jul 21, 2007 9:50 am

Warning: Missing argument 1 for __construct() in

Post by hostservi »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


hello i install OSTUBE and i have this error

Warning: Missing argument 1 for __construct() in /home/artalo04/domains/derechoshumanos.biz/public_html/media/video/uploader/simpleuploader/class.php on line 8

in the file class.php there this:

Code: Select all

<?php

class simpleuploader extends uploader {
	var $prio = 1;

	// PHP 5.x Class-Definition

	function __construct(&$parent) {
	
		$this->parent = &$parent;
		$this->enabled = $this->check_conditions();
	
	}
	
	// PHP 4.x Class Definition
	
	function phpuploader(&$parent) {
	
		$this->__construct($parent);
	
	}

	// check-up
	
	function check_conditions() {
			
		return true;
	
	}
	
	//
	//
	//
	
	function head() {
		global $config, $main;
	
		require_once 'SimpleUpload.class.php';

		$this->upload = new SimpleUpload();	
	
	}

}

?>
How i solvent this
Thanks


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You're missing an argument.....
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

You're not passing &$parent when you're instantiating the object.

The correct way to instantiate it would be..

Code: Select all

new uploader($parent);
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply