Questions tagged [redeclare]
79 questions
2
votes
4 answers
php redeclaring function like in java
Possible Duplicate:
php function overloading
I want to redeclare function such like this:
class Name{
function a(){ something; }
function a($param1){ something; }
}
but it returns
Fatal error: Cannot redeclare Name::a()
In java it just…

Maximus
- 471
- 1
- 10
- 25
1
vote
1 answer
Cannot redeclare get_page_by_title()
I'm not sure what happened, there's a fatal error on my website:
Fatal error: Cannot redeclare get_page_by_title() (previously declared in /home/hamburgerasia/public_html/wp-includes/post.php:5778) in…

Jasmyin Yeap
- 11
- 2
1
vote
1 answer
Yii custom Widget, loader error
Please, help me with this problem (I am using Yii, Xampp on a Windows localhost):
So... I've created a new widget in "protected\components\views\Magus.php".

Sebastian
- 709
- 1
- 8
- 15
1
vote
1 answer
Run a function inside a worpress shortcode php function
I am trying to create a shortcode to connect to an API but there is a problem with the shortcode. I know that it is because a function is inside a functinon but I can't figure out how to fix. I tried something that didn't work.
// Add…

German Pericon
- 11
- 3
1
vote
1 answer
Can I use a name of a deleted pointer?
Is it allowed to use a pointer's name of a pointer once deleted?
This code, for instance, won't compile.
int hundred = 100;
int * const finger = &hundred;
delete finger;
int * finger = new int; // error: conflicting declaration…

Mykola Tetiuk
- 153
- 1
- 13
1
vote
1 answer
ErrorException Cannot redeclare class Concrete\Package\MolliePlugin\Controller in Concrete5 website
I'm new here, so I hope I'm doing this right. I inherited a portfolio of websites and one is a Concrete5 website. Unfortunately I don't have much experience with Concrete5 and I directly start with a site with an issue :(.
When I go to…

Michel FW
- 91
- 8
1
vote
1 answer
Cannot redeclare function in wordpress
I have a following function in one of the files for this plugin "BJ lazy load".

Ryo
- 75
- 8
1
vote
1 answer
How to change the Drupal core module behavior?
How can I change the behavior of search_menu() hook, not changing the search.module code?
I want to change it from:
function search_menu() {
//...
foreach (module_implements('search') as $name) {
$items['search/'. $name .'/%menu_tail'] =…

artyom.stv
- 2,097
- 1
- 24
- 42
1
vote
1 answer
C++: Declare a vector inside or outside of a loop
I would like to loop over several random combinations. Currently, I define a vector v with the numbers 1 to n outside the loop, shuffle v inside the loop and define a new vector combination inside the loop.
int k = 50;
int n = 100;
int…

Alice Schwarze
- 559
- 7
- 21
1
vote
0 answers
Fatal error: Cannot redeclare function for all functions
I think I have had a bug with a contact form which has been working for the last 2 months and now all of a sudden is says:
Fatal error: Cannot redeclare function (previously declared in...)
I have tried turning off the functions one by one but…

Simone
- 21
- 1
1
vote
1 answer
Cannot Redeclare Class WPDB
Just went to a site of mine earlier today, and it was completely a white screen. It runs on Wordpress. I also went to try and login to the login url, and it was completely white as well. So, I went ahead and tried upgrading to the latest version…

Spencer B.
- 233
- 2
- 7
- 15
1
vote
0 answers
Yii - Fatal error: Cannot redeclare function
I have this function called checkCentre1() and I'm unable to open my web application due to below error appearing:
Fatal error: Cannot redeclare checkCentre1() (previously declared in C:\xampp\htdocs\scms2\protected\views\layouts\main.php:39) in…

Wani
- 11
- 5
1
vote
1 answer
I am using include_once but still getting Cannot redeclare. I know the function exists, that is why I'm using include_once
Ok I am trying to modify some code in a WP Plugin. The plugin declares a file for this:
// overwrite hooks
$plugin_dir = trailingslashit(dirname(dirname(__FILE__)));
if(file_exists($plugin_dir . "auto_overwrite.php")){
include_once($plugin_dir .…

Shane
- 25
- 7
1
vote
2 answers
Prestashop two modules use identical name and give "Cannot redeclare class" fatal error
How to avoid "Cannot redeclare class" fatal error when two modules use the same class name in prestashop?
For example, I have module which declares and uses a helper class Foo.
I install a new module which has a different helper class but with the…

Developer
- 35
- 1
- 5
1
vote
1 answer
Error in Symfont 2.8 - Cannot redeclare class Symfony\Component\DependencyInjection\ContainerAwareInterface
Can you help me in this question ...
I use Symfont 2.8 with EasyAdminBundle.
I was used this manual to install - symfony2-admin-panel-in-30-seconds.
Admin panel works fine, but when I try to create my (not-admin) class, I get an error : Cannot…

Дмитрий Черных
- 11
- 3